diff --git a/eventgrid/resource-manager/v2018_05_01_preview/pom.xml b/eventgrid/resource-manager/v2018_05_01_preview/pom.xml
index f2dc0645b10d..8daa7cf34eff 100644
--- a/eventgrid/resource-manager/v2018_05_01_preview/pom.xml
+++ b/eventgrid/resource-manager/v2018_05_01_preview/pom.xml
@@ -71,6 +71,8 @@
azure-arm-client-runtime
test-jar
test
+
+ 1.6.5
diff --git a/eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/DeadLetterDestination.java b/eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/DeadLetterDestination.java
index 8cb5893ed653..fea461dba29c 100644
--- a/eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/DeadLetterDestination.java
+++ b/eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/DeadLetterDestination.java
@@ -19,7 +19,7 @@
* StorageBlobDeadLetterDestination is the only class that derives from this
* class.
*/
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType")
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType", defaultImpl = DeadLetterDestination.class)
@JsonTypeName("DeadLetterDestination")
@JsonSubTypes({
@JsonSubTypes.Type(name = "StorageBlob", value = StorageBlobDeadLetterDestination.class)
diff --git a/eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/EventHubEventSubscriptionDestination.java b/eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/EventHubEventSubscriptionDestination.java
index 619a8b5e0694..69d8e165c2e0 100644
--- a/eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/EventHubEventSubscriptionDestination.java
+++ b/eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/EventHubEventSubscriptionDestination.java
@@ -16,7 +16,7 @@
/**
* Information about the event hub destination for an event subscription.
*/
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType")
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType", defaultImpl = EventHubEventSubscriptionDestination.class)
@JsonTypeName("EventHub")
@JsonFlatten
public class EventHubEventSubscriptionDestination extends EventSubscriptionDestination {
diff --git a/eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/EventSubscriptionDestination.java b/eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/EventSubscriptionDestination.java
index 5bc0efb9141e..4bc66a77a777 100644
--- a/eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/EventSubscriptionDestination.java
+++ b/eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/EventSubscriptionDestination.java
@@ -15,7 +15,7 @@
/**
* Information about the destination for an event subscription.
*/
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType")
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType", defaultImpl = EventSubscriptionDestination.class)
@JsonTypeName("EventSubscriptionDestination")
@JsonSubTypes({
@JsonSubTypes.Type(name = "WebHook", value = WebHookEventSubscriptionDestination.class),
diff --git a/eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/HybridConnectionEventSubscriptionDestination.java b/eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/HybridConnectionEventSubscriptionDestination.java
index 2c550bcd5345..703c28cb31c7 100644
--- a/eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/HybridConnectionEventSubscriptionDestination.java
+++ b/eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/HybridConnectionEventSubscriptionDestination.java
@@ -17,7 +17,7 @@
* Information about the HybridConnection destination for an event
* subscription.
*/
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType")
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType", defaultImpl = HybridConnectionEventSubscriptionDestination.class)
@JsonTypeName("HybridConnection")
@JsonFlatten
public class HybridConnectionEventSubscriptionDestination extends EventSubscriptionDestination {
diff --git a/eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/InputSchemaMapping.java b/eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/InputSchemaMapping.java
index 9b05462d80c1..8971c855b7bf 100644
--- a/eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/InputSchemaMapping.java
+++ b/eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/InputSchemaMapping.java
@@ -18,7 +18,7 @@
* custom input schema. Currently, the only supported type of
* InputSchemaMapping is 'JsonInputSchemaMapping'.
*/
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "inputSchemaMappingType")
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "inputSchemaMappingType", defaultImpl = InputSchemaMapping.class)
@JsonTypeName("InputSchemaMapping")
@JsonSubTypes({
@JsonSubTypes.Type(name = "Json", value = JsonInputSchemaMapping.class)
diff --git a/eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/JsonInputSchemaMapping.java b/eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/JsonInputSchemaMapping.java
index 1535070e375b..a6bf06f3043f 100644
--- a/eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/JsonInputSchemaMapping.java
+++ b/eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/JsonInputSchemaMapping.java
@@ -18,7 +18,7 @@
* be used to map properties from a custom input JSON schema to the Event Grid
* event schema.
*/
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "inputSchemaMappingType")
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "inputSchemaMappingType", defaultImpl = JsonInputSchemaMapping.class)
@JsonTypeName("Json")
@JsonFlatten
public class JsonInputSchemaMapping extends InputSchemaMapping {
diff --git a/eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/StorageBlobDeadLetterDestination.java b/eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/StorageBlobDeadLetterDestination.java
index bf357e5dc13e..780ede98c20a 100644
--- a/eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/StorageBlobDeadLetterDestination.java
+++ b/eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/StorageBlobDeadLetterDestination.java
@@ -16,7 +16,7 @@
/**
* Information about the storage blob based dead letter destination.
*/
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType")
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType", defaultImpl = StorageBlobDeadLetterDestination.class)
@JsonTypeName("StorageBlob")
@JsonFlatten
public class StorageBlobDeadLetterDestination extends DeadLetterDestination {
diff --git a/eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/StorageQueueEventSubscriptionDestination.java b/eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/StorageQueueEventSubscriptionDestination.java
index b4215787aab0..afd9d3d40b9b 100644
--- a/eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/StorageQueueEventSubscriptionDestination.java
+++ b/eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/StorageQueueEventSubscriptionDestination.java
@@ -16,7 +16,7 @@
/**
* Information about the storage queue destination for an event subscription.
*/
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType")
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType", defaultImpl = StorageQueueEventSubscriptionDestination.class)
@JsonTypeName("StorageQueue")
@JsonFlatten
public class StorageQueueEventSubscriptionDestination extends EventSubscriptionDestination {
diff --git a/eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/WebHookEventSubscriptionDestination.java b/eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/WebHookEventSubscriptionDestination.java
index 1bcf9bc01547..edbe0020b2fa 100644
--- a/eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/WebHookEventSubscriptionDestination.java
+++ b/eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/WebHookEventSubscriptionDestination.java
@@ -16,7 +16,7 @@
/**
* Information about the webhook destination for an event subscription.
*/
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType")
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType", defaultImpl = WebHookEventSubscriptionDestination.class)
@JsonTypeName("WebHook")
@JsonFlatten
public class WebHookEventSubscriptionDestination extends EventSubscriptionDestination {
diff --git a/eventgrid/resource-manager/v2018_05_01_preview/src/test/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/EventGridTest.java b/eventgrid/resource-manager/v2018_05_01_preview/src/test/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/EventGridTest.java
deleted file mode 100644
index ccbce1cd8a63..000000000000
--- a/eventgrid/resource-manager/v2018_05_01_preview/src/test/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/EventGridTest.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * 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.management.eventgrid.v2018_05_01_preview;
-import com.microsoft.azure.arm.core.TestBase;
-import com.microsoft.azure.management.eventgrid.v2018_05_01_preview.implementation.EventGridManager;
-import com.microsoft.azure.management.resources.implementation.ResourceManager;
-import com.microsoft.rest.RestClient;
-import com.microsoft.azure.arm.utils.SdkContext;
-import org.junit.Test;
-import org.junit.Assert;
-import com.microsoft.azure.arm.resources.Region;
-import com.microsoft.azure.management.resources.ResourceGroup;
-
-public class EventGridTest extends TestBase {
- protected static ResourceManager resourceManager;
- protected static EventGridManager eventGridManager;
- private static String rgName;
- @Override
- protected void initializeClients(RestClient restClient, String defaultSubscription, String domain) {
- resourceManager = ResourceManager
- .authenticate(restClient)
- .withSubscription(defaultSubscription);
- eventGridManager = EventGridManager
- .authenticate(restClient, defaultSubscription);
- }
- @Override
- protected void cleanUpResources() {
- resourceManager.resourceGroups().deleteByName(rgName);
- }
- @Test
- public void firstTest() {
- rgName = SdkContext.randomResourceName("rg", 20);
- ResourceGroup group = resourceManager.resourceGroups()
- .define(rgName)
- .withRegion(Region.US_WEST.toString())
- .create();
- Assert.assertNotNull(group);
- }
-}
diff --git a/swagger_to_sdk_config.json b/swagger_to_sdk_config.json
index afc88f9313de..143b2e76ed7b 100644
--- a/swagger_to_sdk_config.json
+++ b/swagger_to_sdk_config.json
@@ -6,7 +6,8 @@
"verbose": "",
"sdkrel:azure-libraries-for-java-folder": ".",
"multiapi": "",
- "use": "@microsoft.azure/autorest.java@preview"
+ "use": "@microsoft.azure/autorest.java@preview",
+ "java.clear-output-folder": ""
},
"version": "0.2.0",
"advanced_options": {