com.azure.resourcemanager.security.models.StandardAssignmentMetadata 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.Immutable;
import com.azure.core.util.CoreUtils;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import java.io.IOException;
import java.time.OffsetDateTime;
/**
* The standard assignment metadata.
*/
@Immutable
public final class StandardAssignmentMetadata implements JsonSerializable {
/*
* Standard assignment Created by object id (GUID)
*/
private String createdBy;
/*
* Standard assignment creation date
*/
private OffsetDateTime createdOn;
/*
* Standard assignment last updated by object id (GUID)
*/
private String lastUpdatedBy;
/*
* Standard assignment last update date
*/
private OffsetDateTime lastUpdatedOn;
/**
* Creates an instance of StandardAssignmentMetadata class.
*/
public StandardAssignmentMetadata() {
}
/**
* Get the createdBy property: Standard assignment Created by object id (GUID).
*
* @return the createdBy value.
*/
public String createdBy() {
return this.createdBy;
}
/**
* Get the createdOn property: Standard assignment creation date.
*
* @return the createdOn value.
*/
public OffsetDateTime createdOn() {
return this.createdOn;
}
/**
* Get the lastUpdatedBy property: Standard assignment last updated by object id (GUID).
*
* @return the lastUpdatedBy value.
*/
public String lastUpdatedBy() {
return this.lastUpdatedBy;
}
/**
* Get the lastUpdatedOn property: Standard assignment last update date.
*
* @return the lastUpdatedOn value.
*/
public OffsetDateTime lastUpdatedOn() {
return this.lastUpdatedOn;
}
/**
* 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();
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of StandardAssignmentMetadata from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of StandardAssignmentMetadata 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 StandardAssignmentMetadata.
*/
public static StandardAssignmentMetadata fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
StandardAssignmentMetadata deserializedStandardAssignmentMetadata = new StandardAssignmentMetadata();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("createdBy".equals(fieldName)) {
deserializedStandardAssignmentMetadata.createdBy = reader.getString();
} else if ("createdOn".equals(fieldName)) {
deserializedStandardAssignmentMetadata.createdOn = reader
.getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
} else if ("lastUpdatedBy".equals(fieldName)) {
deserializedStandardAssignmentMetadata.lastUpdatedBy = reader.getString();
} else if ("lastUpdatedOn".equals(fieldName)) {
deserializedStandardAssignmentMetadata.lastUpdatedOn = reader
.getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
} else {
reader.skipChildren();
}
}
return deserializedStandardAssignmentMetadata;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy