com.azure.messaging.eventgrid.systemevents.SubscriptionDeletedEventData 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.Immutable;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import java.io.IOException;
/**
* Schema of the Data property of an EventGridEvent for a Microsoft.EventGrid.SubscriptionDeletedEvent event.
*/
@Immutable
public final class SubscriptionDeletedEventData implements JsonSerializable {
/*
* The Azure resource ID of the deleted event subscription.
*/
private String eventSubscriptionId;
/**
* Creates an instance of SubscriptionDeletedEventData class.
*/
public SubscriptionDeletedEventData() {
}
/**
* Get the eventSubscriptionId property: The Azure resource ID of the deleted event subscription.
*
* @return the eventSubscriptionId value.
*/
public String getEventSubscriptionId() {
return this.eventSubscriptionId;
}
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of SubscriptionDeletedEventData from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of SubscriptionDeletedEventData 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 SubscriptionDeletedEventData.
*/
public static SubscriptionDeletedEventData fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
SubscriptionDeletedEventData deserializedSubscriptionDeletedEventData = new SubscriptionDeletedEventData();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("eventSubscriptionId".equals(fieldName)) {
deserializedSubscriptionDeletedEventData.eventSubscriptionId = reader.getString();
} else {
reader.skipChildren();
}
}
return deserializedSubscriptionDeletedEventData;
});
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy