com.azure.messaging.eventgrid.systemevents.ResourceNotificationsResourceUpdatedEventData Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-messaging-eventgrid Show documentation
Show all versions of azure-messaging-eventgrid Show documentation
This package contains Microsoft Azure EventGrid SDK.
The newest version!
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.messaging.eventgrid.systemevents;
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;
/**
* Describes the schema of the common properties across all ARN system topic events.
*/
@Fluent
public class ResourceNotificationsResourceUpdatedEventData
implements JsonSerializable {
/*
* resourceInfo details for update event
*/
private ResourceNotificationsResourceUpdatedDetails resourceDetails;
/*
* details about operational info
*/
private ResourceNotificationsOperationalDetails operationalDetails;
/*
* api version of the resource properties bag
*/
private String apiVersion;
/**
* Creates an instance of ResourceNotificationsResourceUpdatedEventData class.
*/
public ResourceNotificationsResourceUpdatedEventData() {
}
/**
* Get the resourceDetails property: resourceInfo details for update event.
*
* @return the resourceDetails value.
*/
public ResourceNotificationsResourceUpdatedDetails getResourceDetails() {
return this.resourceDetails;
}
/**
* Set the resourceDetails property: resourceInfo details for update event.
*
* @param resourceDetails the resourceDetails value to set.
* @return the ResourceNotificationsResourceUpdatedEventData object itself.
*/
public ResourceNotificationsResourceUpdatedEventData
setResourceDetails(ResourceNotificationsResourceUpdatedDetails resourceDetails) {
this.resourceDetails = resourceDetails;
return this;
}
/**
* Get the operationalDetails property: details about operational info.
*
* @return the operationalDetails value.
*/
public ResourceNotificationsOperationalDetails getOperationalDetails() {
return this.operationalDetails;
}
/**
* Set the operationalDetails property: details about operational info.
*
* @param operationalDetails the operationalDetails value to set.
* @return the ResourceNotificationsResourceUpdatedEventData object itself.
*/
public ResourceNotificationsResourceUpdatedEventData
setOperationalDetails(ResourceNotificationsOperationalDetails operationalDetails) {
this.operationalDetails = operationalDetails;
return this;
}
/**
* Get the apiVersion property: api version of the resource properties bag.
*
* @return the apiVersion value.
*/
public String getApiVersion() {
return this.apiVersion;
}
/**
* Set the apiVersion property: api version of the resource properties bag.
*
* @param apiVersion the apiVersion value to set.
* @return the ResourceNotificationsResourceUpdatedEventData object itself.
*/
public ResourceNotificationsResourceUpdatedEventData setApiVersion(String apiVersion) {
this.apiVersion = apiVersion;
return this;
}
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeJsonField("resourceInfo", this.resourceDetails);
jsonWriter.writeJsonField("operationalInfo", this.operationalDetails);
jsonWriter.writeStringField("apiVersion", this.apiVersion);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of ResourceNotificationsResourceUpdatedEventData from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of ResourceNotificationsResourceUpdatedEventData 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 ResourceNotificationsResourceUpdatedEventData.
*/
public static ResourceNotificationsResourceUpdatedEventData fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
ResourceNotificationsResourceUpdatedEventData deserializedResourceNotificationsResourceUpdatedEventData
= new ResourceNotificationsResourceUpdatedEventData();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("resourceInfo".equals(fieldName)) {
deserializedResourceNotificationsResourceUpdatedEventData.resourceDetails
= ResourceNotificationsResourceUpdatedDetails.fromJson(reader);
} else if ("operationalInfo".equals(fieldName)) {
deserializedResourceNotificationsResourceUpdatedEventData.operationalDetails
= ResourceNotificationsOperationalDetails.fromJson(reader);
} else if ("apiVersion".equals(fieldName)) {
deserializedResourceNotificationsResourceUpdatedEventData.apiVersion = reader.getString();
} else {
reader.skipChildren();
}
}
return deserializedResourceNotificationsResourceUpdatedEventData;
});
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy