From 4a9f96039bd82ec16fa24803bd634dd87d885175 Mon Sep 17 00:00:00 2001 From: "J. Kalyana Sundaram" Date: Tue, 21 Aug 2018 18:00:16 -0700 Subject: [PATCH 1/2] Regenerated EventGrid dataplane SDK for Java to account for new/updated event types. --- .../DeviceConnectionStateEventInfo.java | 46 +++ .../DeviceConnectionStateEventProperties.java | 128 ++++++++ .../DeviceLifeCycleEventProperties.java | 66 +--- .../eventgrid/models/DeviceTwinInfo.java | 2 +- .../IotHubDeviceConnectedEventData.java | 16 + .../IotHubDeviceDisconnectedEventData.java | 16 + .../azure/eventgrid/models/JobState.java | 68 ++++ .../models/MediaJobStateChangeEventData.java | 50 +++ .../models/ResourceActionCancelData.java | 305 ++++++++++++++++++ .../models/ResourceActionFailureData.java | 305 ++++++++++++++++++ .../models/ResourceActionSuccessData.java | 305 ++++++++++++++++++ .../models/SubscriptionDeletedEventData.java | 33 ++ .../SubscriptionValidationEventData.java | 56 ++++ .../SubscriptionValidationResponse.java | 47 +++ 14 files changed, 1383 insertions(+), 60 deletions(-) create mode 100644 eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/DeviceConnectionStateEventInfo.java create mode 100644 eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/DeviceConnectionStateEventProperties.java create mode 100644 eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/IotHubDeviceConnectedEventData.java create mode 100644 eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/IotHubDeviceDisconnectedEventData.java create mode 100644 eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/JobState.java create mode 100644 eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/MediaJobStateChangeEventData.java create mode 100644 eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/ResourceActionCancelData.java create mode 100644 eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/ResourceActionFailureData.java create mode 100644 eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/ResourceActionSuccessData.java create mode 100644 eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/SubscriptionDeletedEventData.java create mode 100644 eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/SubscriptionValidationEventData.java create mode 100644 eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/SubscriptionValidationResponse.java diff --git a/eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/DeviceConnectionStateEventInfo.java b/eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/DeviceConnectionStateEventInfo.java new file mode 100644 index 000000000000..93a5d34b9cf9 --- /dev/null +++ b/eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/DeviceConnectionStateEventInfo.java @@ -0,0 +1,46 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.eventgrid.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Information about the device connection state event. + */ +public class DeviceConnectionStateEventInfo { + /** + * Sequence number is string representation of a hexadecimal number. string + * compare can be used to identify the larger number because both in ASCII + * and HEX numbers come after alphabets. If you are converting the string + * to hex, then the number is a 256 bit number. + */ + @JsonProperty(value = "sequenceNumber") + private String sequenceNumber; + + /** + * Get sequence number is string representation of a hexadecimal number. string compare can be used to identify the larger number because both in ASCII and HEX numbers come after alphabets. If you are converting the string to hex, then the number is a 256 bit number. + * + * @return the sequenceNumber value + */ + public String sequenceNumber() { + return this.sequenceNumber; + } + + /** + * Set sequence number is string representation of a hexadecimal number. string compare can be used to identify the larger number because both in ASCII and HEX numbers come after alphabets. If you are converting the string to hex, then the number is a 256 bit number. + * + * @param sequenceNumber the sequenceNumber value to set + * @return the DeviceConnectionStateEventInfo object itself. + */ + public DeviceConnectionStateEventInfo withSequenceNumber(String sequenceNumber) { + this.sequenceNumber = sequenceNumber; + return this; + } + +} diff --git a/eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/DeviceConnectionStateEventProperties.java b/eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/DeviceConnectionStateEventProperties.java new file mode 100644 index 000000000000..9e5d57430beb --- /dev/null +++ b/eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/DeviceConnectionStateEventProperties.java @@ -0,0 +1,128 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.eventgrid.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Schema of the Data property of an EventGridEvent for a device connection + * state event (DeviceConnected, DeviceDisconnected). + */ +public class DeviceConnectionStateEventProperties { + /** + * The unique identifier of the device. This case-sensitive string can be + * up to 128 characters long, and supports ASCII 7-bit alphanumeric + * characters plus the following special characters: - : . + % _ # + * * ? ! ( ) , = @ ; $ '. + */ + @JsonProperty(value = "deviceId") + private String deviceId; + + /** + * The unique identifier of the module. This case-sensitive string can be + * up to 128 characters long, and supports ASCII 7-bit alphanumeric + * characters plus the following special characters: - : . + % _ # + * * ? ! ( ) , = @ ; $ '. + */ + @JsonProperty(value = "moduleId") + private String moduleId; + + /** + * Name of the IoT Hub where the device was created or deleted. + */ + @JsonProperty(value = "hubName") + private String hubName; + + /** + * Information about the device connection state event. + */ + @JsonProperty(value = "deviceConnectionStateEventInfo") + private DeviceConnectionStateEventInfo deviceConnectionStateEventInfo; + + /** + * Get the unique identifier of the device. This case-sensitive string can be up to 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + % _ # * ? ! ( ) , = @ ; $ '. + * + * @return the deviceId value + */ + public String deviceId() { + return this.deviceId; + } + + /** + * Set the unique identifier of the device. This case-sensitive string can be up to 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + % _ # * ? ! ( ) , = @ ; $ '. + * + * @param deviceId the deviceId value to set + * @return the DeviceConnectionStateEventProperties object itself. + */ + public DeviceConnectionStateEventProperties withDeviceId(String deviceId) { + this.deviceId = deviceId; + return this; + } + + /** + * Get the unique identifier of the module. This case-sensitive string can be up to 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + % _ # * ? ! ( ) , = @ ; $ '. + * + * @return the moduleId value + */ + public String moduleId() { + return this.moduleId; + } + + /** + * Set the unique identifier of the module. This case-sensitive string can be up to 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + % _ # * ? ! ( ) , = @ ; $ '. + * + * @param moduleId the moduleId value to set + * @return the DeviceConnectionStateEventProperties object itself. + */ + public DeviceConnectionStateEventProperties withModuleId(String moduleId) { + this.moduleId = moduleId; + return this; + } + + /** + * Get name of the IoT Hub where the device was created or deleted. + * + * @return the hubName value + */ + public String hubName() { + return this.hubName; + } + + /** + * Set name of the IoT Hub where the device was created or deleted. + * + * @param hubName the hubName value to set + * @return the DeviceConnectionStateEventProperties object itself. + */ + public DeviceConnectionStateEventProperties withHubName(String hubName) { + this.hubName = hubName; + return this; + } + + /** + * Get information about the device connection state event. + * + * @return the deviceConnectionStateEventInfo value + */ + public DeviceConnectionStateEventInfo deviceConnectionStateEventInfo() { + return this.deviceConnectionStateEventInfo; + } + + /** + * Set information about the device connection state event. + * + * @param deviceConnectionStateEventInfo the deviceConnectionStateEventInfo value to set + * @return the DeviceConnectionStateEventProperties object itself. + */ + public DeviceConnectionStateEventProperties withDeviceConnectionStateEventInfo(DeviceConnectionStateEventInfo deviceConnectionStateEventInfo) { + this.deviceConnectionStateEventInfo = deviceConnectionStateEventInfo; + return this; + } + +} diff --git a/eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/DeviceLifeCycleEventProperties.java b/eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/DeviceLifeCycleEventProperties.java index 73dc46f7f4d4..afef3326da36 100755 --- a/eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/DeviceLifeCycleEventProperties.java +++ b/eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/DeviceLifeCycleEventProperties.java @@ -18,8 +18,8 @@ public class DeviceLifeCycleEventProperties { /** * The unique identifier of the device. This case-sensitive string can be * up to 128 characters long, and supports ASCII 7-bit alphanumeric - * characters plus the following special characters: - : . + % _ # * ? ! ( - * ) , = @ ; $ '. + * characters plus the following special characters: - : . + % _ # + * * ? ! ( ) , = @ ; $ '. */ @JsonProperty(value = "deviceId") private String deviceId; @@ -31,26 +31,14 @@ public class DeviceLifeCycleEventProperties { private String hubName; /** - * The event type specified for this operation by the IoT Hub. - */ - @JsonProperty(value = "opType") - private String opType; - - /** - * The ISO8601 timestamp of the operation. - */ - @JsonProperty(value = "operationTimestamp") - private String operationTimestamp; - - /** - * Information about the device twin, which is the cloud represenation of + * Information about the device twin, which is the cloud representation of * application device metadata. */ @JsonProperty(value = "twin") private DeviceTwinInfo twin; /** - * Get the unique identifier of the device. This case-sensitive string can be up to 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + % _ # * ? ! ( ) , = @ ; $ '. + * Get the unique identifier of the device. This case-sensitive string can be up to 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + % _ # * ? ! ( ) , = @ ; $ '. * * @return the deviceId value */ @@ -59,7 +47,7 @@ public String deviceId() { } /** - * Set the unique identifier of the device. This case-sensitive string can be up to 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + % _ # * ? ! ( ) , = @ ; $ '. + * Set the unique identifier of the device. This case-sensitive string can be up to 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + % _ # * ? ! ( ) , = @ ; $ '. * * @param deviceId the deviceId value to set * @return the DeviceLifeCycleEventProperties object itself. @@ -90,47 +78,7 @@ public DeviceLifeCycleEventProperties withHubName(String hubName) { } /** - * Get the event type specified for this operation by the IoT Hub. - * - * @return the opType value - */ - public String opType() { - return this.opType; - } - - /** - * Set the event type specified for this operation by the IoT Hub. - * - * @param opType the opType value to set - * @return the DeviceLifeCycleEventProperties object itself. - */ - public DeviceLifeCycleEventProperties withOpType(String opType) { - this.opType = opType; - return this; - } - - /** - * Get the ISO8601 timestamp of the operation. - * - * @return the operationTimestamp value - */ - public String operationTimestamp() { - return this.operationTimestamp; - } - - /** - * Set the ISO8601 timestamp of the operation. - * - * @param operationTimestamp the operationTimestamp value to set - * @return the DeviceLifeCycleEventProperties object itself. - */ - public DeviceLifeCycleEventProperties withOperationTimestamp(String operationTimestamp) { - this.operationTimestamp = operationTimestamp; - return this; - } - - /** - * Get information about the device twin, which is the cloud represenation of application device metadata. + * Get information about the device twin, which is the cloud representation of application device metadata. * * @return the twin value */ @@ -139,7 +87,7 @@ public DeviceTwinInfo twin() { } /** - * Set information about the device twin, which is the cloud represenation of application device metadata. + * Set information about the device twin, which is the cloud representation of application device metadata. * * @param twin the twin value to set * @return the DeviceLifeCycleEventProperties object itself. diff --git a/eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/DeviceTwinInfo.java b/eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/DeviceTwinInfo.java index ecf9c20347d7..0446c475ae75 100755 --- a/eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/DeviceTwinInfo.java +++ b/eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/DeviceTwinInfo.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** - * Information about the device twin, which is the cloud represenation of + * Information about the device twin, which is the cloud representation of * application device metadata. */ public class DeviceTwinInfo { diff --git a/eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/IotHubDeviceConnectedEventData.java b/eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/IotHubDeviceConnectedEventData.java new file mode 100644 index 000000000000..64c500c5961a --- /dev/null +++ b/eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/IotHubDeviceConnectedEventData.java @@ -0,0 +1,16 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.eventgrid.models; + + +/** + * Event data for Microsoft.Devices.DeviceConnected event. + */ +public class IotHubDeviceConnectedEventData extends DeviceConnectionStateEventProperties { +} diff --git a/eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/IotHubDeviceDisconnectedEventData.java b/eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/IotHubDeviceDisconnectedEventData.java new file mode 100644 index 000000000000..7e070d9835e4 --- /dev/null +++ b/eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/IotHubDeviceDisconnectedEventData.java @@ -0,0 +1,16 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.eventgrid.models; + + +/** + * Event data for Microsoft.Devices.DeviceDisconnected event. + */ +public class IotHubDeviceDisconnectedEventData extends DeviceConnectionStateEventProperties { +} diff --git a/eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/JobState.java b/eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/JobState.java new file mode 100644 index 000000000000..742ccf518763 --- /dev/null +++ b/eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/JobState.java @@ -0,0 +1,68 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.eventgrid.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for JobState. + */ +public enum JobState { + /** The job was canceled. This is a final state for the job. */ + CANCELED("Canceled"), + + /** The job is in the process of being canceled. This is a transient state for the job. */ + CANCELING("Canceling"), + + /** The job has encountered an error. This is a final state for the job. */ + ERROR("Error"), + + /** The job is finished. This is a final state for the job. */ + FINISHED("Finished"), + + /** The job is processing. This is a transient state for the job. */ + PROCESSING("Processing"), + + /** The job is in a queued state, waiting for resources to become available. This is a transient state. */ + QUEUED("Queued"), + + /** The job is being scheduled to run on an available resource. This is a transient state, between queued and processing states. */ + SCHEDULED("Scheduled"); + + /** The actual serialized value for a JobState instance. */ + private String value; + + JobState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a JobState instance. + * + * @param value the serialized value to parse. + * @return the parsed JobState object, or null if unable to parse. + */ + @JsonCreator + public static JobState fromString(String value) { + JobState[] items = JobState.values(); + for (JobState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/MediaJobStateChangeEventData.java b/eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/MediaJobStateChangeEventData.java new file mode 100644 index 000000000000..2b65073794cb --- /dev/null +++ b/eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/MediaJobStateChangeEventData.java @@ -0,0 +1,50 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.eventgrid.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Schema of the Data property of an EventGridEvent for a + * Microsoft.Media.JobStateChange event. + */ +public class MediaJobStateChangeEventData { + /** + * The previous state of the Job. Possible values include: 'Canceled', + * 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', 'Scheduled'. + */ + @JsonProperty(value = "previousState", access = JsonProperty.Access.WRITE_ONLY) + private JobState previousState; + + /** + * The new state of the Job. Possible values include: 'Canceled', + * 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', 'Scheduled'. + */ + @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) + private JobState state; + + /** + * Get the previous state of the Job. Possible values include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', 'Scheduled'. + * + * @return the previousState value + */ + public JobState previousState() { + return this.previousState; + } + + /** + * Get the new state of the Job. Possible values include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', 'Scheduled'. + * + * @return the state value + */ + public JobState state() { + return this.state; + } + +} diff --git a/eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/ResourceActionCancelData.java b/eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/ResourceActionCancelData.java new file mode 100644 index 000000000000..a5448a68f93c --- /dev/null +++ b/eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/ResourceActionCancelData.java @@ -0,0 +1,305 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.eventgrid.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Schema of the Data property of an EventGridEvent for an + * Microsoft.Resources.ResourceActionCancel event. This is raised when a + * resource action operation is canceled. + */ +public class ResourceActionCancelData { + /** + * The tenant ID of the resource. + */ + @JsonProperty(value = "tenantId") + private String tenantId; + + /** + * The subscription ID of the resource. + */ + @JsonProperty(value = "subscriptionId") + private String subscriptionId; + + /** + * The resource group of the resource. + */ + @JsonProperty(value = "resourceGroup") + private String resourceGroup; + + /** + * The resource provider performing the operation. + */ + @JsonProperty(value = "resourceProvider") + private String resourceProvider; + + /** + * The URI of the resource in the operation. + */ + @JsonProperty(value = "resourceUri") + private String resourceUri; + + /** + * The operation that was performed. + */ + @JsonProperty(value = "operationName") + private String operationName; + + /** + * The status of the operation. + */ + @JsonProperty(value = "status") + private String status; + + /** + * The requested authorization for the operation. + */ + @JsonProperty(value = "authorization") + private String authorization; + + /** + * The properties of the claims. + */ + @JsonProperty(value = "claims") + private String claims; + + /** + * An operation ID used for troubleshooting. + */ + @JsonProperty(value = "correlationId") + private String correlationId; + + /** + * The details of the operation. + */ + @JsonProperty(value = "httpRequest") + private String httpRequest; + + /** + * Get the tenant ID of the resource. + * + * @return the tenantId value + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Set the tenant ID of the resource. + * + * @param tenantId the tenantId value to set + * @return the ResourceActionCancelData object itself. + */ + public ResourceActionCancelData withTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get the subscription ID of the resource. + * + * @return the subscriptionId value + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Set the subscription ID of the resource. + * + * @param subscriptionId the subscriptionId value to set + * @return the ResourceActionCancelData object itself. + */ + public ResourceActionCancelData withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** + * Get the resource group of the resource. + * + * @return the resourceGroup value + */ + public String resourceGroup() { + return this.resourceGroup; + } + + /** + * Set the resource group of the resource. + * + * @param resourceGroup the resourceGroup value to set + * @return the ResourceActionCancelData object itself. + */ + public ResourceActionCancelData withResourceGroup(String resourceGroup) { + this.resourceGroup = resourceGroup; + return this; + } + + /** + * Get the resource provider performing the operation. + * + * @return the resourceProvider value + */ + public String resourceProvider() { + return this.resourceProvider; + } + + /** + * Set the resource provider performing the operation. + * + * @param resourceProvider the resourceProvider value to set + * @return the ResourceActionCancelData object itself. + */ + public ResourceActionCancelData withResourceProvider(String resourceProvider) { + this.resourceProvider = resourceProvider; + return this; + } + + /** + * Get the URI of the resource in the operation. + * + * @return the resourceUri value + */ + public String resourceUri() { + return this.resourceUri; + } + + /** + * Set the URI of the resource in the operation. + * + * @param resourceUri the resourceUri value to set + * @return the ResourceActionCancelData object itself. + */ + public ResourceActionCancelData withResourceUri(String resourceUri) { + this.resourceUri = resourceUri; + return this; + } + + /** + * Get the operation that was performed. + * + * @return the operationName value + */ + public String operationName() { + return this.operationName; + } + + /** + * Set the operation that was performed. + * + * @param operationName the operationName value to set + * @return the ResourceActionCancelData object itself. + */ + public ResourceActionCancelData withOperationName(String operationName) { + this.operationName = operationName; + return this; + } + + /** + * Get the status of the operation. + * + * @return the status value + */ + public String status() { + return this.status; + } + + /** + * Set the status of the operation. + * + * @param status the status value to set + * @return the ResourceActionCancelData object itself. + */ + public ResourceActionCancelData withStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the requested authorization for the operation. + * + * @return the authorization value + */ + public String authorization() { + return this.authorization; + } + + /** + * Set the requested authorization for the operation. + * + * @param authorization the authorization value to set + * @return the ResourceActionCancelData object itself. + */ + public ResourceActionCancelData withAuthorization(String authorization) { + this.authorization = authorization; + return this; + } + + /** + * Get the properties of the claims. + * + * @return the claims value + */ + public String claims() { + return this.claims; + } + + /** + * Set the properties of the claims. + * + * @param claims the claims value to set + * @return the ResourceActionCancelData object itself. + */ + public ResourceActionCancelData withClaims(String claims) { + this.claims = claims; + return this; + } + + /** + * Get an operation ID used for troubleshooting. + * + * @return the correlationId value + */ + public String correlationId() { + return this.correlationId; + } + + /** + * Set an operation ID used for troubleshooting. + * + * @param correlationId the correlationId value to set + * @return the ResourceActionCancelData object itself. + */ + public ResourceActionCancelData withCorrelationId(String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + * Get the details of the operation. + * + * @return the httpRequest value + */ + public String httpRequest() { + return this.httpRequest; + } + + /** + * Set the details of the operation. + * + * @param httpRequest the httpRequest value to set + * @return the ResourceActionCancelData object itself. + */ + public ResourceActionCancelData withHttpRequest(String httpRequest) { + this.httpRequest = httpRequest; + return this; + } + +} diff --git a/eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/ResourceActionFailureData.java b/eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/ResourceActionFailureData.java new file mode 100644 index 000000000000..e8a03a049716 --- /dev/null +++ b/eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/ResourceActionFailureData.java @@ -0,0 +1,305 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.eventgrid.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Schema of the Data property of an EventGridEvent for a + * Microsoft.Resources.ResourceActionFailure event. This is raised when a + * resource action operation fails. + */ +public class ResourceActionFailureData { + /** + * The tenant ID of the resource. + */ + @JsonProperty(value = "tenantId") + private String tenantId; + + /** + * The subscription ID of the resource. + */ + @JsonProperty(value = "subscriptionId") + private String subscriptionId; + + /** + * The resource group of the resource. + */ + @JsonProperty(value = "resourceGroup") + private String resourceGroup; + + /** + * The resource provider performing the operation. + */ + @JsonProperty(value = "resourceProvider") + private String resourceProvider; + + /** + * The URI of the resource in the operation. + */ + @JsonProperty(value = "resourceUri") + private String resourceUri; + + /** + * The operation that was performed. + */ + @JsonProperty(value = "operationName") + private String operationName; + + /** + * The status of the operation. + */ + @JsonProperty(value = "status") + private String status; + + /** + * The requested authorization for the operation. + */ + @JsonProperty(value = "authorization") + private String authorization; + + /** + * The properties of the claims. + */ + @JsonProperty(value = "claims") + private String claims; + + /** + * An operation ID used for troubleshooting. + */ + @JsonProperty(value = "correlationId") + private String correlationId; + + /** + * The details of the operation. + */ + @JsonProperty(value = "httpRequest") + private String httpRequest; + + /** + * Get the tenant ID of the resource. + * + * @return the tenantId value + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Set the tenant ID of the resource. + * + * @param tenantId the tenantId value to set + * @return the ResourceActionFailureData object itself. + */ + public ResourceActionFailureData withTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get the subscription ID of the resource. + * + * @return the subscriptionId value + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Set the subscription ID of the resource. + * + * @param subscriptionId the subscriptionId value to set + * @return the ResourceActionFailureData object itself. + */ + public ResourceActionFailureData withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** + * Get the resource group of the resource. + * + * @return the resourceGroup value + */ + public String resourceGroup() { + return this.resourceGroup; + } + + /** + * Set the resource group of the resource. + * + * @param resourceGroup the resourceGroup value to set + * @return the ResourceActionFailureData object itself. + */ + public ResourceActionFailureData withResourceGroup(String resourceGroup) { + this.resourceGroup = resourceGroup; + return this; + } + + /** + * Get the resource provider performing the operation. + * + * @return the resourceProvider value + */ + public String resourceProvider() { + return this.resourceProvider; + } + + /** + * Set the resource provider performing the operation. + * + * @param resourceProvider the resourceProvider value to set + * @return the ResourceActionFailureData object itself. + */ + public ResourceActionFailureData withResourceProvider(String resourceProvider) { + this.resourceProvider = resourceProvider; + return this; + } + + /** + * Get the URI of the resource in the operation. + * + * @return the resourceUri value + */ + public String resourceUri() { + return this.resourceUri; + } + + /** + * Set the URI of the resource in the operation. + * + * @param resourceUri the resourceUri value to set + * @return the ResourceActionFailureData object itself. + */ + public ResourceActionFailureData withResourceUri(String resourceUri) { + this.resourceUri = resourceUri; + return this; + } + + /** + * Get the operation that was performed. + * + * @return the operationName value + */ + public String operationName() { + return this.operationName; + } + + /** + * Set the operation that was performed. + * + * @param operationName the operationName value to set + * @return the ResourceActionFailureData object itself. + */ + public ResourceActionFailureData withOperationName(String operationName) { + this.operationName = operationName; + return this; + } + + /** + * Get the status of the operation. + * + * @return the status value + */ + public String status() { + return this.status; + } + + /** + * Set the status of the operation. + * + * @param status the status value to set + * @return the ResourceActionFailureData object itself. + */ + public ResourceActionFailureData withStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the requested authorization for the operation. + * + * @return the authorization value + */ + public String authorization() { + return this.authorization; + } + + /** + * Set the requested authorization for the operation. + * + * @param authorization the authorization value to set + * @return the ResourceActionFailureData object itself. + */ + public ResourceActionFailureData withAuthorization(String authorization) { + this.authorization = authorization; + return this; + } + + /** + * Get the properties of the claims. + * + * @return the claims value + */ + public String claims() { + return this.claims; + } + + /** + * Set the properties of the claims. + * + * @param claims the claims value to set + * @return the ResourceActionFailureData object itself. + */ + public ResourceActionFailureData withClaims(String claims) { + this.claims = claims; + return this; + } + + /** + * Get an operation ID used for troubleshooting. + * + * @return the correlationId value + */ + public String correlationId() { + return this.correlationId; + } + + /** + * Set an operation ID used for troubleshooting. + * + * @param correlationId the correlationId value to set + * @return the ResourceActionFailureData object itself. + */ + public ResourceActionFailureData withCorrelationId(String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + * Get the details of the operation. + * + * @return the httpRequest value + */ + public String httpRequest() { + return this.httpRequest; + } + + /** + * Set the details of the operation. + * + * @param httpRequest the httpRequest value to set + * @return the ResourceActionFailureData object itself. + */ + public ResourceActionFailureData withHttpRequest(String httpRequest) { + this.httpRequest = httpRequest; + return this; + } + +} diff --git a/eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/ResourceActionSuccessData.java b/eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/ResourceActionSuccessData.java new file mode 100644 index 000000000000..d4fdb8c17824 --- /dev/null +++ b/eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/ResourceActionSuccessData.java @@ -0,0 +1,305 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.eventgrid.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Schema of the Data property of an EventGridEvent for a + * Microsoft.Resources.ResourceActionSuccess event. This is raised when a + * resource action operation succeeds. + */ +public class ResourceActionSuccessData { + /** + * The tenant ID of the resource. + */ + @JsonProperty(value = "tenantId") + private String tenantId; + + /** + * The subscription ID of the resource. + */ + @JsonProperty(value = "subscriptionId") + private String subscriptionId; + + /** + * The resource group of the resource. + */ + @JsonProperty(value = "resourceGroup") + private String resourceGroup; + + /** + * The resource provider performing the operation. + */ + @JsonProperty(value = "resourceProvider") + private String resourceProvider; + + /** + * The URI of the resource in the operation. + */ + @JsonProperty(value = "resourceUri") + private String resourceUri; + + /** + * The operation that was performed. + */ + @JsonProperty(value = "operationName") + private String operationName; + + /** + * The status of the operation. + */ + @JsonProperty(value = "status") + private String status; + + /** + * The requested authorization for the operation. + */ + @JsonProperty(value = "authorization") + private String authorization; + + /** + * The properties of the claims. + */ + @JsonProperty(value = "claims") + private String claims; + + /** + * An operation ID used for troubleshooting. + */ + @JsonProperty(value = "correlationId") + private String correlationId; + + /** + * The details of the operation. + */ + @JsonProperty(value = "httpRequest") + private String httpRequest; + + /** + * Get the tenant ID of the resource. + * + * @return the tenantId value + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Set the tenant ID of the resource. + * + * @param tenantId the tenantId value to set + * @return the ResourceActionSuccessData object itself. + */ + public ResourceActionSuccessData withTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get the subscription ID of the resource. + * + * @return the subscriptionId value + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Set the subscription ID of the resource. + * + * @param subscriptionId the subscriptionId value to set + * @return the ResourceActionSuccessData object itself. + */ + public ResourceActionSuccessData withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** + * Get the resource group of the resource. + * + * @return the resourceGroup value + */ + public String resourceGroup() { + return this.resourceGroup; + } + + /** + * Set the resource group of the resource. + * + * @param resourceGroup the resourceGroup value to set + * @return the ResourceActionSuccessData object itself. + */ + public ResourceActionSuccessData withResourceGroup(String resourceGroup) { + this.resourceGroup = resourceGroup; + return this; + } + + /** + * Get the resource provider performing the operation. + * + * @return the resourceProvider value + */ + public String resourceProvider() { + return this.resourceProvider; + } + + /** + * Set the resource provider performing the operation. + * + * @param resourceProvider the resourceProvider value to set + * @return the ResourceActionSuccessData object itself. + */ + public ResourceActionSuccessData withResourceProvider(String resourceProvider) { + this.resourceProvider = resourceProvider; + return this; + } + + /** + * Get the URI of the resource in the operation. + * + * @return the resourceUri value + */ + public String resourceUri() { + return this.resourceUri; + } + + /** + * Set the URI of the resource in the operation. + * + * @param resourceUri the resourceUri value to set + * @return the ResourceActionSuccessData object itself. + */ + public ResourceActionSuccessData withResourceUri(String resourceUri) { + this.resourceUri = resourceUri; + return this; + } + + /** + * Get the operation that was performed. + * + * @return the operationName value + */ + public String operationName() { + return this.operationName; + } + + /** + * Set the operation that was performed. + * + * @param operationName the operationName value to set + * @return the ResourceActionSuccessData object itself. + */ + public ResourceActionSuccessData withOperationName(String operationName) { + this.operationName = operationName; + return this; + } + + /** + * Get the status of the operation. + * + * @return the status value + */ + public String status() { + return this.status; + } + + /** + * Set the status of the operation. + * + * @param status the status value to set + * @return the ResourceActionSuccessData object itself. + */ + public ResourceActionSuccessData withStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the requested authorization for the operation. + * + * @return the authorization value + */ + public String authorization() { + return this.authorization; + } + + /** + * Set the requested authorization for the operation. + * + * @param authorization the authorization value to set + * @return the ResourceActionSuccessData object itself. + */ + public ResourceActionSuccessData withAuthorization(String authorization) { + this.authorization = authorization; + return this; + } + + /** + * Get the properties of the claims. + * + * @return the claims value + */ + public String claims() { + return this.claims; + } + + /** + * Set the properties of the claims. + * + * @param claims the claims value to set + * @return the ResourceActionSuccessData object itself. + */ + public ResourceActionSuccessData withClaims(String claims) { + this.claims = claims; + return this; + } + + /** + * Get an operation ID used for troubleshooting. + * + * @return the correlationId value + */ + public String correlationId() { + return this.correlationId; + } + + /** + * Set an operation ID used for troubleshooting. + * + * @param correlationId the correlationId value to set + * @return the ResourceActionSuccessData object itself. + */ + public ResourceActionSuccessData withCorrelationId(String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + * Get the details of the operation. + * + * @return the httpRequest value + */ + public String httpRequest() { + return this.httpRequest; + } + + /** + * Set the details of the operation. + * + * @param httpRequest the httpRequest value to set + * @return the ResourceActionSuccessData object itself. + */ + public ResourceActionSuccessData withHttpRequest(String httpRequest) { + this.httpRequest = httpRequest; + return this; + } + +} diff --git a/eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/SubscriptionDeletedEventData.java b/eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/SubscriptionDeletedEventData.java new file mode 100644 index 000000000000..212c25afeed9 --- /dev/null +++ b/eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/SubscriptionDeletedEventData.java @@ -0,0 +1,33 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.eventgrid.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Schema of the Data property of an EventGridEvent for a + * Microsoft.EventGrid.SubscriptionDeletedEvent. + */ +public class SubscriptionDeletedEventData { + /** + * The Azure resource ID of the deleted event subscription. + */ + @JsonProperty(value = "eventSubscriptionId", access = JsonProperty.Access.WRITE_ONLY) + private String eventSubscriptionId; + + /** + * Get the Azure resource ID of the deleted event subscription. + * + * @return the eventSubscriptionId value + */ + public String eventSubscriptionId() { + return this.eventSubscriptionId; + } + +} diff --git a/eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/SubscriptionValidationEventData.java b/eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/SubscriptionValidationEventData.java new file mode 100644 index 000000000000..b7b6af284e4f --- /dev/null +++ b/eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/SubscriptionValidationEventData.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.eventgrid.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Schema of the Data property of an EventGridEvent for a + * Microsoft.EventGrid.SubscriptionValidationEvent. + */ +public class SubscriptionValidationEventData { + /** + * The validation code sent by Azure Event Grid to validate an event + * subscription. To complete the validation handshake, the subscriber must + * either respond with this validation code as part of the validation + * response, or perform a GET request on the validationUrl (available + * starting version 2018-05-01-preview). + */ + @JsonProperty(value = "validationCode", access = JsonProperty.Access.WRITE_ONLY) + private String validationCode; + + /** + * The validation URL sent by Azure Event Grid (available starting version + * 2018-05-01-preview). To complete the validation handshake, the + * subscriber must either respond with the validationCode as part of the + * validation response, or perform a GET request on the validationUrl + * (available starting version 2018-05-01-preview). + */ + @JsonProperty(value = "validationUrl", access = JsonProperty.Access.WRITE_ONLY) + private String validationUrl; + + /** + * Get the validation code sent by Azure Event Grid to validate an event subscription. To complete the validation handshake, the subscriber must either respond with this validation code as part of the validation response, or perform a GET request on the validationUrl (available starting version 2018-05-01-preview). + * + * @return the validationCode value + */ + public String validationCode() { + return this.validationCode; + } + + /** + * Get the validation URL sent by Azure Event Grid (available starting version 2018-05-01-preview). To complete the validation handshake, the subscriber must either respond with the validationCode as part of the validation response, or perform a GET request on the validationUrl (available starting version 2018-05-01-preview). + * + * @return the validationUrl value + */ + public String validationUrl() { + return this.validationUrl; + } + +} diff --git a/eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/SubscriptionValidationResponse.java b/eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/SubscriptionValidationResponse.java new file mode 100644 index 000000000000..e91b1531ba01 --- /dev/null +++ b/eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/models/SubscriptionValidationResponse.java @@ -0,0 +1,47 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.eventgrid.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * To complete an event subscription validation handshake, a subscriber can use + * either the validationCode or the validationUrl received in a + * SubscriptionValidationEvent. When the validationCode is used, the + * SubscriptionValidationResponse can be used to build the response. + */ +public class SubscriptionValidationResponse { + /** + * The validation response sent by the subscriber to Azure Event Grid to + * complete the validation of an event subscription. + */ + @JsonProperty(value = "validationResponse") + private String validationResponse; + + /** + * Get the validation response sent by the subscriber to Azure Event Grid to complete the validation of an event subscription. + * + * @return the validationResponse value + */ + public String validationResponse() { + return this.validationResponse; + } + + /** + * Set the validation response sent by the subscriber to Azure Event Grid to complete the validation of an event subscription. + * + * @param validationResponse the validationResponse value to set + * @return the SubscriptionValidationResponse object itself. + */ + public SubscriptionValidationResponse withValidationResponse(String validationResponse) { + this.validationResponse = validationResponse; + return this; + } + +} From 8ee172ffc1efb1a2c07a608bc5408486a1281cee Mon Sep 17 00:00:00 2001 From: "J. Kalyana Sundaram" Date: Wed, 22 Aug 2018 11:22:13 -0700 Subject: [PATCH 2/2] Updated version in pom.xml. --- eventgrid/data-plane/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eventgrid/data-plane/pom.xml b/eventgrid/data-plane/pom.xml index ae7a200eb5a2..cf2f3ac203a6 100755 --- a/eventgrid/data-plane/pom.xml +++ b/eventgrid/data-plane/pom.xml @@ -9,7 +9,7 @@ 4.0.0 com.microsoft.azure azure-eventgrid - 1.1.0 + 1.2.0 jar Microsoft Azure SDK for eventgrid This package contains Microsoft eventgrid SDK.