Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EventGrid DataPlane SDK: Regenerate the SDK based on latest Swagger to include new event types. #2341

Merged
merged 2 commits into from
Sep 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eventgrid/data-plane/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-eventgrid</artifactId>
<version>1.1.0</version>
<version>1.2.0</version>
<packaging>jar</packaging>
<name>Microsoft Azure SDK for eventgrid</name>
<description>This package contains Microsoft eventgrid SDK.</description>
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
}

}
Original file line number Diff line number Diff line change
@@ -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: - : . + % _ &amp;#35;
* * ? ! ( ) , = @ ; $ '.
*/
@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: - : . + % _ &amp;#35;
* * ? ! ( ) , = @ ; $ '.
*/
@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: - : . + % _ &amp;#35; * ? ! ( ) , = @ ; $ '.
*
* @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: - : . + % _ &amp;#35; * ? ! ( ) , = @ ; $ '.
*
* @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: - : . + % _ &amp;#35; * ? ! ( ) , = @ ; $ '.
*
* @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: - : . + % _ &amp;#35; * ? ! ( ) , = @ ; $ '.
*
* @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;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -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: - : . + % _ &amp;#35;
* * ? ! ( ) , = @ ; $ '.
*/
@JsonProperty(value = "deviceId")
private String deviceId;
Expand All @@ -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: - : . + % _ &amp;#35; * ? ! ( ) , = @ ; $ '.
*
* @return the deviceId value
*/
Expand All @@ -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: - : . + % _ &amp;#35; * ? ! ( ) , = @ ; $ '.
*
* @param deviceId the deviceId value to set
* @return the DeviceLifeCycleEventProperties object itself.
Expand Down Expand Up @@ -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
*/
Expand All @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {
}
Original file line number Diff line number Diff line change
@@ -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 {
}
Loading