diff --git a/eventgrid/resource-manager/v2019_01_01/pom.xml b/eventgrid/resource-manager/v2019_01_01/pom.xml
new file mode 100644
index 0000000000000..14fd665c4356b
--- /dev/null
+++ b/eventgrid/resource-manager/v2019_01_01/pom.xml
@@ -0,0 +1,133 @@
+
+
+ 4.0.0
+ com.microsoft.azure.eventgrid.v2019_01_01
+
+ com.microsoft.azure
+ azure-arm-parent
+ 0.0.3-beta
+ ../../../pom.xml
+
+ azure-mgmt-eventgrid
+ 1.0.0-beta
+ jar
+ Microsoft Azure SDK for EventGrid Management
+ This package contains Microsoft EventGrid Management SDK.
+ https://github.com/Azure/azure-sdk-for-java
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
+
+ scm:git:https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ HEAD
+
+
+ UTF-8
+
+
+
+
+ microsoft
+ Microsoft
+
+
+
+
+ com.microsoft.azure
+ azure-client-runtime
+
+
+ com.microsoft.azure
+ azure-arm-client-runtime
+
+
+ junit
+ junit
+ test
+
+
+ com.microsoft.azure
+ azure-client-authentication
+ test
+
+
+ com.microsoft.azure
+ azure-mgmt-resources
+ test
+
+
+ com.microsoft.azure
+ azure-arm-client-runtime
+ test-jar
+ test
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+
+
+
+ true
+ true
+
+
+
+
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.1
+
+
+ 1.7
+
+
+ com.microsoft.azure.management.apigeneration.LangDefinitionProcessor
+
+
+ true
+ true
+
+ true
+ true
+
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 2.8
+
+ *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search
+
+
+ /**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ */
+ ]]>
+
+
+
+
+
+
diff --git a/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/DeadLetterDestination.java b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/DeadLetterDestination.java
new file mode 100644
index 0000000000000..c71e8daa37ab1
--- /dev/null
+++ b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/DeadLetterDestination.java
@@ -0,0 +1,28 @@
+/**
+ * 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.v2019_01_01;
+
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+
+/**
+ * Information about the dead letter destination for an event subscription. To
+ * configure a deadletter destination, do not directly instantiate an object of
+ * this class. Instead, instantiate an object of a derived class. Currently,
+ * StorageBlobDeadLetterDestination is the only class that derives from this
+ * class.
+ */
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType")
+@JsonTypeName("DeadLetterDestination")
+@JsonSubTypes({
+ @JsonSubTypes.Type(name = "StorageBlob", value = StorageBlobDeadLetterDestination.class)
+})
+public class DeadLetterDestination {
+}
diff --git a/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/EventHubEventSubscriptionDestination.java b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/EventHubEventSubscriptionDestination.java
new file mode 100644
index 0000000000000..c17ff8bdfcaaf
--- /dev/null
+++ b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/EventHubEventSubscriptionDestination.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.management.eventgrid.v2019_01_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.microsoft.rest.serializer.JsonFlatten;
+
+/**
+ * Information about the event hub destination for an event subscription.
+ */
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType")
+@JsonTypeName("EventHub")
+@JsonFlatten
+public class EventHubEventSubscriptionDestination extends EventSubscriptionDestination {
+ /**
+ * The Azure Resource Id that represents the endpoint of an Event Hub
+ * destination of an event subscription.
+ */
+ @JsonProperty(value = "properties.resourceId")
+ private String resourceId;
+
+ /**
+ * Get the Azure Resource Id that represents the endpoint of an Event Hub destination of an event subscription.
+ *
+ * @return the resourceId value
+ */
+ public String resourceId() {
+ return this.resourceId;
+ }
+
+ /**
+ * Set the Azure Resource Id that represents the endpoint of an Event Hub destination of an event subscription.
+ *
+ * @param resourceId the resourceId value to set
+ * @return the EventHubEventSubscriptionDestination object itself.
+ */
+ public EventHubEventSubscriptionDestination withResourceId(String resourceId) {
+ this.resourceId = resourceId;
+ return this;
+ }
+
+}
diff --git a/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/EventSubscription.java b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/EventSubscription.java
new file mode 100644
index 0000000000000..30087b1428014
--- /dev/null
+++ b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/EventSubscription.java
@@ -0,0 +1,243 @@
+/**
+ * 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.v2019_01_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.eventgrid.v2019_01_01.implementation.EventSubscriptionInner;
+import com.microsoft.azure.arm.model.Indexable;
+import com.microsoft.azure.arm.model.Creatable;
+import com.microsoft.azure.arm.model.Updatable;
+import com.microsoft.azure.arm.model.Appliable;
+import com.microsoft.azure.arm.model.Refreshable;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.eventgrid.v2019_01_01.implementation.EventGridManager;
+import java.util.List;
+
+/**
+ * Type representing EventSubscription.
+ */
+public interface EventSubscription extends HasInner, Indexable, Updatable, Refreshable, HasManager {
+ /**
+ * @return the deadLetterDestination value.
+ */
+ DeadLetterDestination deadLetterDestination();
+
+ /**
+ * @return the destination value.
+ */
+ EventSubscriptionDestination destination();
+
+ /**
+ * @return the filter value.
+ */
+ EventSubscriptionFilter filter();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the labels value.
+ */
+ List labels();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the provisioningState value.
+ */
+ EventSubscriptionProvisioningState provisioningState();
+
+ /**
+ * @return the retryPolicy value.
+ */
+ RetryPolicy retryPolicy();
+
+ /**
+ * @return the topic value.
+ */
+ String topic();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * The entirety of the EventSubscription definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithScope, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of EventSubscription definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a EventSubscription definition.
+ */
+ interface Blank extends WithScope {
+ }
+
+ /**
+ * The stage of the eventsubscription definition allowing to specify Scope.
+ */
+ interface WithScope {
+ /**
+ * Specifies scope.
+ * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic
+ * @return the next definition stage
+ */
+ WithCreate withScope(String scope);
+ }
+
+ /**
+ * The stage of the eventsubscription definition allowing to specify DeadLetterDestination.
+ */
+ interface WithDeadLetterDestination {
+ /**
+ * Specifies deadLetterDestination.
+ * @param deadLetterDestination The DeadLetter destination of the event subscription
+ * @return the next definition stage
+ */
+ WithCreate withDeadLetterDestination(DeadLetterDestination deadLetterDestination);
+ }
+
+ /**
+ * The stage of the eventsubscription definition allowing to specify Destination.
+ */
+ interface WithDestination {
+ /**
+ * Specifies destination.
+ * @param destination Information about the destination where events have to be delivered for the event subscription
+ * @return the next definition stage
+ */
+ WithCreate withDestination(EventSubscriptionDestination destination);
+ }
+
+ /**
+ * The stage of the eventsubscription definition allowing to specify Filter.
+ */
+ interface WithFilter {
+ /**
+ * Specifies filter.
+ * @param filter Information about the filter for the event subscription
+ * @return the next definition stage
+ */
+ WithCreate withFilter(EventSubscriptionFilter filter);
+ }
+
+ /**
+ * The stage of the eventsubscription definition allowing to specify Labels.
+ */
+ interface WithLabels {
+ /**
+ * Specifies labels.
+ * @param labels List of user defined labels
+ * @return the next definition stage
+ */
+ WithCreate withLabels(List labels);
+ }
+
+ /**
+ * The stage of the eventsubscription definition allowing to specify RetryPolicy.
+ */
+ interface WithRetryPolicy {
+ /**
+ * Specifies retryPolicy.
+ * @param retryPolicy The retry policy for events. This can be used to configure maximum number of delivery attempts and time to live for events
+ * @return the next definition stage
+ */
+ WithCreate withRetryPolicy(RetryPolicy retryPolicy);
+ }
+
+ /**
+ * The stage of the definition which contains all the minimum required inputs for
+ * the resource to be created (via {@link WithCreate#create()}), but also allows
+ * for any other optional settings to be specified.
+ */
+ interface WithCreate extends Creatable, DefinitionStages.WithDeadLetterDestination, DefinitionStages.WithDestination, DefinitionStages.WithFilter, DefinitionStages.WithLabels, DefinitionStages.WithRetryPolicy {
+ }
+ }
+ /**
+ * The template for a EventSubscription update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, UpdateStages.WithDeadLetterDestination, UpdateStages.WithDestination, UpdateStages.WithFilter, UpdateStages.WithLabels, UpdateStages.WithRetryPolicy {
+ }
+
+ /**
+ * Grouping of EventSubscription update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the eventsubscription update allowing to specify DeadLetterDestination.
+ */
+ interface WithDeadLetterDestination {
+ /**
+ * Specifies deadLetterDestination.
+ * @param deadLetterDestination The DeadLetter destination of the event subscription
+ * @return the next update stage
+ */
+ Update withDeadLetterDestination(DeadLetterDestination deadLetterDestination);
+ }
+
+ /**
+ * The stage of the eventsubscription update allowing to specify Destination.
+ */
+ interface WithDestination {
+ /**
+ * Specifies destination.
+ * @param destination Information about the destination where events have to be delivered for the event subscription
+ * @return the next update stage
+ */
+ Update withDestination(EventSubscriptionDestination destination);
+ }
+
+ /**
+ * The stage of the eventsubscription update allowing to specify Filter.
+ */
+ interface WithFilter {
+ /**
+ * Specifies filter.
+ * @param filter Information about the filter for the event subscription
+ * @return the next update stage
+ */
+ Update withFilter(EventSubscriptionFilter filter);
+ }
+
+ /**
+ * The stage of the eventsubscription update allowing to specify Labels.
+ */
+ interface WithLabels {
+ /**
+ * Specifies labels.
+ * @param labels List of user defined labels
+ * @return the next update stage
+ */
+ Update withLabels(List labels);
+ }
+
+ /**
+ * The stage of the eventsubscription update allowing to specify RetryPolicy.
+ */
+ interface WithRetryPolicy {
+ /**
+ * Specifies retryPolicy.
+ * @param retryPolicy The retry policy for events. This can be used to configure maximum number of delivery attempts and time to live for events
+ * @return the next update stage
+ */
+ Update withRetryPolicy(RetryPolicy retryPolicy);
+ }
+
+ }
+}
diff --git a/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/EventSubscriptionDestination.java b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/EventSubscriptionDestination.java
new file mode 100644
index 0000000000000..2e3df95ced99b
--- /dev/null
+++ b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/EventSubscriptionDestination.java
@@ -0,0 +1,27 @@
+/**
+ * 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.v2019_01_01;
+
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+
+/**
+ * Information about the destination for an event subscription.
+ */
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType")
+@JsonTypeName("EventSubscriptionDestination")
+@JsonSubTypes({
+ @JsonSubTypes.Type(name = "WebHook", value = WebHookEventSubscriptionDestination.class),
+ @JsonSubTypes.Type(name = "EventHub", value = EventHubEventSubscriptionDestination.class),
+ @JsonSubTypes.Type(name = "StorageQueue", value = StorageQueueEventSubscriptionDestination.class),
+ @JsonSubTypes.Type(name = "HybridConnection", value = HybridConnectionEventSubscriptionDestination.class)
+})
+public class EventSubscriptionDestination {
+}
diff --git a/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/EventSubscriptionFilter.java b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/EventSubscriptionFilter.java
new file mode 100644
index 0000000000000..703601cfb6365
--- /dev/null
+++ b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/EventSubscriptionFilter.java
@@ -0,0 +1,142 @@
+/**
+ * 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.v2019_01_01;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Filter for the Event Subscription.
+ */
+public class EventSubscriptionFilter {
+ /**
+ * An optional string to filter events for an event subscription based on a
+ * resource path prefix.
+ * The format of this depends on the publisher of the events.
+ * Wildcard characters are not supported in this path.
+ */
+ @JsonProperty(value = "subjectBeginsWith")
+ private String subjectBeginsWith;
+
+ /**
+ * An optional string to filter events for an event subscription based on a
+ * resource path suffix.
+ * Wildcard characters are not supported in this path.
+ */
+ @JsonProperty(value = "subjectEndsWith")
+ private String subjectEndsWith;
+
+ /**
+ * A list of applicable event types that need to be part of the event
+ * subscription.
+ * If it is desired to subscribe to all event types, the string "all" needs
+ * to be specified as an element in this list.
+ */
+ @JsonProperty(value = "includedEventTypes")
+ private List includedEventTypes;
+
+ /**
+ * Specifies if the SubjectBeginsWith and SubjectEndsWith properties of the
+ * filter
+ * should be compared in a case sensitive manner.
+ */
+ @JsonProperty(value = "isSubjectCaseSensitive")
+ private Boolean isSubjectCaseSensitive;
+
+ /**
+ * Get an optional string to filter events for an event subscription based on a resource path prefix.
+ The format of this depends on the publisher of the events.
+ Wildcard characters are not supported in this path.
+ *
+ * @return the subjectBeginsWith value
+ */
+ public String subjectBeginsWith() {
+ return this.subjectBeginsWith;
+ }
+
+ /**
+ * Set an optional string to filter events for an event subscription based on a resource path prefix.
+ The format of this depends on the publisher of the events.
+ Wildcard characters are not supported in this path.
+ *
+ * @param subjectBeginsWith the subjectBeginsWith value to set
+ * @return the EventSubscriptionFilter object itself.
+ */
+ public EventSubscriptionFilter withSubjectBeginsWith(String subjectBeginsWith) {
+ this.subjectBeginsWith = subjectBeginsWith;
+ return this;
+ }
+
+ /**
+ * Get an optional string to filter events for an event subscription based on a resource path suffix.
+ Wildcard characters are not supported in this path.
+ *
+ * @return the subjectEndsWith value
+ */
+ public String subjectEndsWith() {
+ return this.subjectEndsWith;
+ }
+
+ /**
+ * Set an optional string to filter events for an event subscription based on a resource path suffix.
+ Wildcard characters are not supported in this path.
+ *
+ * @param subjectEndsWith the subjectEndsWith value to set
+ * @return the EventSubscriptionFilter object itself.
+ */
+ public EventSubscriptionFilter withSubjectEndsWith(String subjectEndsWith) {
+ this.subjectEndsWith = subjectEndsWith;
+ return this;
+ }
+
+ /**
+ * Get a list of applicable event types that need to be part of the event subscription.
+ If it is desired to subscribe to all event types, the string "all" needs to be specified as an element in this list.
+ *
+ * @return the includedEventTypes value
+ */
+ public List includedEventTypes() {
+ return this.includedEventTypes;
+ }
+
+ /**
+ * Set a list of applicable event types that need to be part of the event subscription.
+ If it is desired to subscribe to all event types, the string "all" needs to be specified as an element in this list.
+ *
+ * @param includedEventTypes the includedEventTypes value to set
+ * @return the EventSubscriptionFilter object itself.
+ */
+ public EventSubscriptionFilter withIncludedEventTypes(List includedEventTypes) {
+ this.includedEventTypes = includedEventTypes;
+ return this;
+ }
+
+ /**
+ * Get specifies if the SubjectBeginsWith and SubjectEndsWith properties of the filter
+ should be compared in a case sensitive manner.
+ *
+ * @return the isSubjectCaseSensitive value
+ */
+ public Boolean isSubjectCaseSensitive() {
+ return this.isSubjectCaseSensitive;
+ }
+
+ /**
+ * Set specifies if the SubjectBeginsWith and SubjectEndsWith properties of the filter
+ should be compared in a case sensitive manner.
+ *
+ * @param isSubjectCaseSensitive the isSubjectCaseSensitive value to set
+ * @return the EventSubscriptionFilter object itself.
+ */
+ public EventSubscriptionFilter withIsSubjectCaseSensitive(Boolean isSubjectCaseSensitive) {
+ this.isSubjectCaseSensitive = isSubjectCaseSensitive;
+ return this;
+ }
+
+}
diff --git a/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/EventSubscriptionFullUrl.java b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/EventSubscriptionFullUrl.java
new file mode 100644
index 0000000000000..728401ef94515
--- /dev/null
+++ b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/EventSubscriptionFullUrl.java
@@ -0,0 +1,25 @@
+/**
+ * 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.v2019_01_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.eventgrid.v2019_01_01.implementation.EventGridManager;
+import com.microsoft.azure.management.eventgrid.v2019_01_01.implementation.EventSubscriptionFullUrlInner;
+
+/**
+ * Type representing EventSubscriptionFullUrl.
+ */
+public interface EventSubscriptionFullUrl extends HasInner, HasManager {
+ /**
+ * @return the endpointUrl value.
+ */
+ String endpointUrl();
+
+}
diff --git a/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/EventSubscriptionProvisioningState.java b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/EventSubscriptionProvisioningState.java
new file mode 100644
index 0000000000000..81aafa52d2e91
--- /dev/null
+++ b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/EventSubscriptionProvisioningState.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.management.eventgrid.v2019_01_01;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for EventSubscriptionProvisioningState.
+ */
+public final class EventSubscriptionProvisioningState extends ExpandableStringEnum {
+ /** Static value Creating for EventSubscriptionProvisioningState. */
+ public static final EventSubscriptionProvisioningState CREATING = fromString("Creating");
+
+ /** Static value Updating for EventSubscriptionProvisioningState. */
+ public static final EventSubscriptionProvisioningState UPDATING = fromString("Updating");
+
+ /** Static value Deleting for EventSubscriptionProvisioningState. */
+ public static final EventSubscriptionProvisioningState DELETING = fromString("Deleting");
+
+ /** Static value Succeeded for EventSubscriptionProvisioningState. */
+ public static final EventSubscriptionProvisioningState SUCCEEDED = fromString("Succeeded");
+
+ /** Static value Canceled for EventSubscriptionProvisioningState. */
+ public static final EventSubscriptionProvisioningState CANCELED = fromString("Canceled");
+
+ /** Static value Failed for EventSubscriptionProvisioningState. */
+ public static final EventSubscriptionProvisioningState FAILED = fromString("Failed");
+
+ /** Static value AwaitingManualAction for EventSubscriptionProvisioningState. */
+ public static final EventSubscriptionProvisioningState AWAITING_MANUAL_ACTION = fromString("AwaitingManualAction");
+
+ /**
+ * Creates or finds a EventSubscriptionProvisioningState from its string representation.
+ * @param name a name to look for
+ * @return the corresponding EventSubscriptionProvisioningState
+ */
+ @JsonCreator
+ public static EventSubscriptionProvisioningState fromString(String name) {
+ return fromString(name, EventSubscriptionProvisioningState.class);
+ }
+
+ /**
+ * @return known EventSubscriptionProvisioningState values
+ */
+ public static Collection values() {
+ return values(EventSubscriptionProvisioningState.class);
+ }
+}
diff --git a/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/EventSubscriptionUpdateParameters.java b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/EventSubscriptionUpdateParameters.java
new file mode 100644
index 0000000000000..4b6fef9ac023b
--- /dev/null
+++ b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/EventSubscriptionUpdateParameters.java
@@ -0,0 +1,150 @@
+/**
+ * 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.v2019_01_01;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Properties of the Event Subscription update.
+ */
+public class EventSubscriptionUpdateParameters {
+ /**
+ * Information about the destination where events have to be delivered for
+ * the event subscription.
+ */
+ @JsonProperty(value = "destination")
+ private EventSubscriptionDestination destination;
+
+ /**
+ * Information about the filter for the event subscription.
+ */
+ @JsonProperty(value = "filter")
+ private EventSubscriptionFilter filter;
+
+ /**
+ * List of user defined labels.
+ */
+ @JsonProperty(value = "labels")
+ private List labels;
+
+ /**
+ * The retry policy for events. This can be used to configure maximum
+ * number of delivery attempts and time to live for events.
+ */
+ @JsonProperty(value = "retryPolicy")
+ private RetryPolicy retryPolicy;
+
+ /**
+ * The DeadLetter destination of the event subscription.
+ */
+ @JsonProperty(value = "deadLetterDestination")
+ private DeadLetterDestination deadLetterDestination;
+
+ /**
+ * Get information about the destination where events have to be delivered for the event subscription.
+ *
+ * @return the destination value
+ */
+ public EventSubscriptionDestination destination() {
+ return this.destination;
+ }
+
+ /**
+ * Set information about the destination where events have to be delivered for the event subscription.
+ *
+ * @param destination the destination value to set
+ * @return the EventSubscriptionUpdateParameters object itself.
+ */
+ public EventSubscriptionUpdateParameters withDestination(EventSubscriptionDestination destination) {
+ this.destination = destination;
+ return this;
+ }
+
+ /**
+ * Get information about the filter for the event subscription.
+ *
+ * @return the filter value
+ */
+ public EventSubscriptionFilter filter() {
+ return this.filter;
+ }
+
+ /**
+ * Set information about the filter for the event subscription.
+ *
+ * @param filter the filter value to set
+ * @return the EventSubscriptionUpdateParameters object itself.
+ */
+ public EventSubscriptionUpdateParameters withFilter(EventSubscriptionFilter filter) {
+ this.filter = filter;
+ return this;
+ }
+
+ /**
+ * Get list of user defined labels.
+ *
+ * @return the labels value
+ */
+ public List labels() {
+ return this.labels;
+ }
+
+ /**
+ * Set list of user defined labels.
+ *
+ * @param labels the labels value to set
+ * @return the EventSubscriptionUpdateParameters object itself.
+ */
+ public EventSubscriptionUpdateParameters withLabels(List labels) {
+ this.labels = labels;
+ return this;
+ }
+
+ /**
+ * Get the retry policy for events. This can be used to configure maximum number of delivery attempts and time to live for events.
+ *
+ * @return the retryPolicy value
+ */
+ public RetryPolicy retryPolicy() {
+ return this.retryPolicy;
+ }
+
+ /**
+ * Set the retry policy for events. This can be used to configure maximum number of delivery attempts and time to live for events.
+ *
+ * @param retryPolicy the retryPolicy value to set
+ * @return the EventSubscriptionUpdateParameters object itself.
+ */
+ public EventSubscriptionUpdateParameters withRetryPolicy(RetryPolicy retryPolicy) {
+ this.retryPolicy = retryPolicy;
+ return this;
+ }
+
+ /**
+ * Get the DeadLetter destination of the event subscription.
+ *
+ * @return the deadLetterDestination value
+ */
+ public DeadLetterDestination deadLetterDestination() {
+ return this.deadLetterDestination;
+ }
+
+ /**
+ * Set the DeadLetter destination of the event subscription.
+ *
+ * @param deadLetterDestination the deadLetterDestination value to set
+ * @return the EventSubscriptionUpdateParameters object itself.
+ */
+ public EventSubscriptionUpdateParameters withDeadLetterDestination(DeadLetterDestination deadLetterDestination) {
+ this.deadLetterDestination = deadLetterDestination;
+ return this;
+ }
+
+}
diff --git a/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/EventSubscriptions.java b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/EventSubscriptions.java
new file mode 100644
index 0000000000000..bcdae9c155c6f
--- /dev/null
+++ b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/EventSubscriptions.java
@@ -0,0 +1,134 @@
+/**
+ * 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.v2019_01_01;
+
+import com.microsoft.azure.arm.collection.SupportsCreating;
+import com.microsoft.azure.arm.resources.collection.SupportsListingByResourceGroup;
+import com.microsoft.azure.arm.collection.SupportsListing;
+import rx.Completable;
+import rx.Observable;
+import com.microsoft.azure.management.eventgrid.v2019_01_01.implementation.EventSubscriptionsInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing EventSubscriptions.
+ */
+public interface EventSubscriptions extends SupportsCreating, SupportsListingByResourceGroup, SupportsListing, HasInner {
+ /**
+ * Get an event subscription.
+ * Get properties of an event subscription.
+ *
+ * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic.
+ * @param eventSubscriptionName Name of the event subscription
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String scope, String eventSubscriptionName);
+
+ /**
+ * Delete an event subscription.
+ * Delete an existing event subscription.
+ *
+ * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic.
+ * @param eventSubscriptionName Name of the event subscription
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable deleteAsync(String scope, String eventSubscriptionName);
+
+ /**
+ * Get full URL of an event subscription.
+ * Get the full endpoint URL for an event subscription.
+ *
+ * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic.
+ * @param eventSubscriptionName Name of the event subscription
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getFullUrlAsync(String scope, String eventSubscriptionName);
+
+ /**
+ * List all global event subscriptions for a topic type.
+ * List all global event subscriptions under an Azure subscription for a topic type.
+ *
+ * @param topicTypeName Name of the topic type
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listGlobalBySubscriptionForTopicTypeAsync(String topicTypeName);
+
+ /**
+ * List all global event subscriptions under a resource group for a topic type.
+ * List all global event subscriptions under a resource group for a specific topic type.
+ *
+ * @param resourceGroupName The name of the resource group within the user's subscription.
+ * @param topicTypeName Name of the topic type
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listGlobalByResourceGroupForTopicTypeAsync(String resourceGroupName, String topicTypeName);
+
+ /**
+ * List all regional event subscriptions under an Azure subscription.
+ * List all event subscriptions from the given location under a specific Azure subscription.
+ *
+ * @param location Name of the location
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listRegionalBySubscriptionAsync(String location);
+
+ /**
+ * List all regional event subscriptions under an Azure subscription and resource group.
+ * List all event subscriptions from the given location under a specific Azure subscription and resource group.
+ *
+ * @param resourceGroupName The name of the resource group within the user's subscription.
+ * @param location Name of the location
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listRegionalByResourceGroupAsync(String resourceGroupName, String location);
+
+ /**
+ * List all regional event subscriptions under an Azure subscription for a topic type.
+ * List all event subscriptions from the given location under a specific Azure subscription and topic type.
+ *
+ * @param location Name of the location
+ * @param topicTypeName Name of the topic type
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listRegionalBySubscriptionForTopicTypeAsync(String location, String topicTypeName);
+
+ /**
+ * List all regional event subscriptions under an Azure subscription and resource group for a topic type.
+ * List all event subscriptions from the given location under a specific Azure subscription and resource group and topic type.
+ *
+ * @param resourceGroupName The name of the resource group within the user's subscription.
+ * @param location Name of the location
+ * @param topicTypeName Name of the topic type
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listRegionalByResourceGroupForTopicTypeAsync(String resourceGroupName, String location, String topicTypeName);
+
+ /**
+ * List all event subscriptions for a specific topic.
+ * List all event subscriptions that have been created for a specific topic.
+ *
+ * @param resourceGroupName The name of the resource group within the user's subscription.
+ * @param providerNamespace Namespace of the provider of the topic
+ * @param resourceTypeName Name of the resource type
+ * @param resourceName Name of the resource
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listByResourceAsync(String resourceGroupName, String providerNamespace, String resourceTypeName, String resourceName);
+
+}
diff --git a/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/EventType.java b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/EventType.java
new file mode 100644
index 0000000000000..08609b12e6e3b
--- /dev/null
+++ b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/EventType.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.management.eventgrid.v2019_01_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.eventgrid.v2019_01_01.implementation.EventTypeInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.eventgrid.v2019_01_01.implementation.EventGridManager;
+
+/**
+ * Type representing EventType.
+ */
+public interface EventType extends HasInner, HasManager {
+ /**
+ * @return the description value.
+ */
+ String description();
+
+ /**
+ * @return the displayName value.
+ */
+ String displayName();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the schemaUrl value.
+ */
+ String schemaUrl();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+}
diff --git a/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/HybridConnectionEventSubscriptionDestination.java b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/HybridConnectionEventSubscriptionDestination.java
new file mode 100644
index 0000000000000..fce1a977a2865
--- /dev/null
+++ b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/HybridConnectionEventSubscriptionDestination.java
@@ -0,0 +1,51 @@
+/**
+ * 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.v2019_01_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.microsoft.rest.serializer.JsonFlatten;
+
+/**
+ * Information about the HybridConnection destination for an event
+ * subscription.
+ */
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType")
+@JsonTypeName("HybridConnection")
+@JsonFlatten
+public class HybridConnectionEventSubscriptionDestination extends EventSubscriptionDestination {
+ /**
+ * The Azure Resource ID of an hybrid connection that is the destination of
+ * an event subscription.
+ */
+ @JsonProperty(value = "properties.resourceId")
+ private String resourceId;
+
+ /**
+ * Get the Azure Resource ID of an hybrid connection that is the destination of an event subscription.
+ *
+ * @return the resourceId value
+ */
+ public String resourceId() {
+ return this.resourceId;
+ }
+
+ /**
+ * Set the Azure Resource ID of an hybrid connection that is the destination of an event subscription.
+ *
+ * @param resourceId the resourceId value to set
+ * @return the HybridConnectionEventSubscriptionDestination object itself.
+ */
+ public HybridConnectionEventSubscriptionDestination withResourceId(String resourceId) {
+ this.resourceId = resourceId;
+ return this;
+ }
+
+}
diff --git a/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/Operation.java b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/Operation.java
new file mode 100644
index 0000000000000..e394c20b8f6d0
--- /dev/null
+++ b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/Operation.java
@@ -0,0 +1,40 @@
+/**
+ * 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.v2019_01_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.eventgrid.v2019_01_01.implementation.EventGridManager;
+import com.microsoft.azure.management.eventgrid.v2019_01_01.implementation.OperationInner;
+
+/**
+ * Type representing Operation.
+ */
+public interface Operation extends HasInner, HasManager {
+ /**
+ * @return the display value.
+ */
+ OperationInfo display();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the origin value.
+ */
+ String origin();
+
+ /**
+ * @return the properties value.
+ */
+ Object properties();
+
+}
diff --git a/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/OperationInfo.java b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/OperationInfo.java
new file mode 100644
index 0000000000000..68f7c0da86ea8
--- /dev/null
+++ b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/OperationInfo.java
@@ -0,0 +1,121 @@
+/**
+ * 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.v2019_01_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Information about an operation.
+ */
+public class OperationInfo {
+ /**
+ * Name of the provider.
+ */
+ @JsonProperty(value = "provider")
+ private String provider;
+
+ /**
+ * Name of the resource type.
+ */
+ @JsonProperty(value = "resource")
+ private String resource;
+
+ /**
+ * Name of the operation.
+ */
+ @JsonProperty(value = "operation")
+ private String operation;
+
+ /**
+ * Description of the operation.
+ */
+ @JsonProperty(value = "description")
+ private String description;
+
+ /**
+ * Get name of the provider.
+ *
+ * @return the provider value
+ */
+ public String provider() {
+ return this.provider;
+ }
+
+ /**
+ * Set name of the provider.
+ *
+ * @param provider the provider value to set
+ * @return the OperationInfo object itself.
+ */
+ public OperationInfo withProvider(String provider) {
+ this.provider = provider;
+ return this;
+ }
+
+ /**
+ * Get name of the resource type.
+ *
+ * @return the resource value
+ */
+ public String resource() {
+ return this.resource;
+ }
+
+ /**
+ * Set name of the resource type.
+ *
+ * @param resource the resource value to set
+ * @return the OperationInfo object itself.
+ */
+ public OperationInfo withResource(String resource) {
+ this.resource = resource;
+ return this;
+ }
+
+ /**
+ * Get name of the operation.
+ *
+ * @return the operation value
+ */
+ public String operation() {
+ return this.operation;
+ }
+
+ /**
+ * Set name of the operation.
+ *
+ * @param operation the operation value to set
+ * @return the OperationInfo object itself.
+ */
+ public OperationInfo withOperation(String operation) {
+ this.operation = operation;
+ return this;
+ }
+
+ /**
+ * Get description of the operation.
+ *
+ * @return the description value
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Set description of the operation.
+ *
+ * @param description the description value to set
+ * @return the OperationInfo object itself.
+ */
+ public OperationInfo withDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+}
diff --git a/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/Operations.java b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/Operations.java
new file mode 100644
index 0000000000000..de846ad09c19e
--- /dev/null
+++ b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/Operations.java
@@ -0,0 +1,28 @@
+/**
+ * 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.v2019_01_01;
+
+import rx.Observable;
+import com.microsoft.azure.management.eventgrid.v2019_01_01.implementation.OperationsInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing Operations.
+ */
+public interface Operations extends HasInner {
+ /**
+ * List available operations.
+ * List the available operations supported by the Microsoft.EventGrid resource provider.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listAsync();
+
+}
diff --git a/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/ResourceRegionType.java b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/ResourceRegionType.java
new file mode 100644
index 0000000000000..d085e36f6e520
--- /dev/null
+++ b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/ResourceRegionType.java
@@ -0,0 +1,41 @@
+/**
+ * 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.v2019_01_01;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for ResourceRegionType.
+ */
+public final class ResourceRegionType extends ExpandableStringEnum {
+ /** Static value RegionalResource for ResourceRegionType. */
+ public static final ResourceRegionType REGIONAL_RESOURCE = fromString("RegionalResource");
+
+ /** Static value GlobalResource for ResourceRegionType. */
+ public static final ResourceRegionType GLOBAL_RESOURCE = fromString("GlobalResource");
+
+ /**
+ * Creates or finds a ResourceRegionType from its string representation.
+ * @param name a name to look for
+ * @return the corresponding ResourceRegionType
+ */
+ @JsonCreator
+ public static ResourceRegionType fromString(String name) {
+ return fromString(name, ResourceRegionType.class);
+ }
+
+ /**
+ * @return known ResourceRegionType values
+ */
+ public static Collection values() {
+ return values(ResourceRegionType.class);
+ }
+}
diff --git a/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/RetryPolicy.java b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/RetryPolicy.java
new file mode 100644
index 0000000000000..579611edc2e94
--- /dev/null
+++ b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/RetryPolicy.java
@@ -0,0 +1,69 @@
+/**
+ * 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.v2019_01_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Information about the retry policy for an event subscription.
+ */
+public class RetryPolicy {
+ /**
+ * Maximum number of delivery retry attempts for events.
+ */
+ @JsonProperty(value = "maxDeliveryAttempts")
+ private Integer maxDeliveryAttempts;
+
+ /**
+ * Time To Live (in minutes) for events.
+ */
+ @JsonProperty(value = "eventTimeToLiveInMinutes")
+ private Integer eventTimeToLiveInMinutes;
+
+ /**
+ * Get maximum number of delivery retry attempts for events.
+ *
+ * @return the maxDeliveryAttempts value
+ */
+ public Integer maxDeliveryAttempts() {
+ return this.maxDeliveryAttempts;
+ }
+
+ /**
+ * Set maximum number of delivery retry attempts for events.
+ *
+ * @param maxDeliveryAttempts the maxDeliveryAttempts value to set
+ * @return the RetryPolicy object itself.
+ */
+ public RetryPolicy withMaxDeliveryAttempts(Integer maxDeliveryAttempts) {
+ this.maxDeliveryAttempts = maxDeliveryAttempts;
+ return this;
+ }
+
+ /**
+ * Get time To Live (in minutes) for events.
+ *
+ * @return the eventTimeToLiveInMinutes value
+ */
+ public Integer eventTimeToLiveInMinutes() {
+ return this.eventTimeToLiveInMinutes;
+ }
+
+ /**
+ * Set time To Live (in minutes) for events.
+ *
+ * @param eventTimeToLiveInMinutes the eventTimeToLiveInMinutes value to set
+ * @return the RetryPolicy object itself.
+ */
+ public RetryPolicy withEventTimeToLiveInMinutes(Integer eventTimeToLiveInMinutes) {
+ this.eventTimeToLiveInMinutes = eventTimeToLiveInMinutes;
+ return this;
+ }
+
+}
diff --git a/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/StorageBlobDeadLetterDestination.java b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/StorageBlobDeadLetterDestination.java
new file mode 100644
index 0000000000000..ad78db352eebd
--- /dev/null
+++ b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/StorageBlobDeadLetterDestination.java
@@ -0,0 +1,78 @@
+/**
+ * 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.v2019_01_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.microsoft.rest.serializer.JsonFlatten;
+
+/**
+ * Information about the storage blob based dead letter destination.
+ */
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType")
+@JsonTypeName("StorageBlob")
+@JsonFlatten
+public class StorageBlobDeadLetterDestination extends DeadLetterDestination {
+ /**
+ * The Azure Resource ID of the storage blob container that is the
+ * destination of the deadletter events. For example:
+ * /subscriptions/{AzureSubscriptionId}/resourceGroups/{ResourceGroupName}/providers/microsoft.Storage/storageAccounts/{StorageAccountName}.
+ */
+ @JsonProperty(value = "properties.resourceId")
+ private String resourceId;
+
+ /**
+ * The name of the Storage blob container that is the destination of the
+ * deadletter events.
+ */
+ @JsonProperty(value = "properties.blobContainerName")
+ private String blobContainerName;
+
+ /**
+ * Get the Azure Resource ID of the storage blob container that is the destination of the deadletter events. For example: /subscriptions/{AzureSubscriptionId}/resourceGroups/{ResourceGroupName}/providers/microsoft.Storage/storageAccounts/{StorageAccountName}.
+ *
+ * @return the resourceId value
+ */
+ public String resourceId() {
+ return this.resourceId;
+ }
+
+ /**
+ * Set the Azure Resource ID of the storage blob container that is the destination of the deadletter events. For example: /subscriptions/{AzureSubscriptionId}/resourceGroups/{ResourceGroupName}/providers/microsoft.Storage/storageAccounts/{StorageAccountName}.
+ *
+ * @param resourceId the resourceId value to set
+ * @return the StorageBlobDeadLetterDestination object itself.
+ */
+ public StorageBlobDeadLetterDestination withResourceId(String resourceId) {
+ this.resourceId = resourceId;
+ return this;
+ }
+
+ /**
+ * Get the name of the Storage blob container that is the destination of the deadletter events.
+ *
+ * @return the blobContainerName value
+ */
+ public String blobContainerName() {
+ return this.blobContainerName;
+ }
+
+ /**
+ * Set the name of the Storage blob container that is the destination of the deadletter events.
+ *
+ * @param blobContainerName the blobContainerName value to set
+ * @return the StorageBlobDeadLetterDestination object itself.
+ */
+ public StorageBlobDeadLetterDestination withBlobContainerName(String blobContainerName) {
+ this.blobContainerName = blobContainerName;
+ return this;
+ }
+
+}
diff --git a/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/StorageQueueEventSubscriptionDestination.java b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/StorageQueueEventSubscriptionDestination.java
new file mode 100644
index 0000000000000..6ba84f19322c6
--- /dev/null
+++ b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/StorageQueueEventSubscriptionDestination.java
@@ -0,0 +1,77 @@
+/**
+ * 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.v2019_01_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.microsoft.rest.serializer.JsonFlatten;
+
+/**
+ * Information about the storage queue destination for an event subscription.
+ */
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType")
+@JsonTypeName("StorageQueue")
+@JsonFlatten
+public class StorageQueueEventSubscriptionDestination extends EventSubscriptionDestination {
+ /**
+ * The Azure Resource ID of the storage account that contains the queue
+ * that is the destination of an event subscription.
+ */
+ @JsonProperty(value = "properties.resourceId")
+ private String resourceId;
+
+ /**
+ * The name of the Storage queue under a storage account that is the
+ * destination of an event subscription.
+ */
+ @JsonProperty(value = "properties.queueName")
+ private String queueName;
+
+ /**
+ * Get the Azure Resource ID of the storage account that contains the queue that is the destination of an event subscription.
+ *
+ * @return the resourceId value
+ */
+ public String resourceId() {
+ return this.resourceId;
+ }
+
+ /**
+ * Set the Azure Resource ID of the storage account that contains the queue that is the destination of an event subscription.
+ *
+ * @param resourceId the resourceId value to set
+ * @return the StorageQueueEventSubscriptionDestination object itself.
+ */
+ public StorageQueueEventSubscriptionDestination withResourceId(String resourceId) {
+ this.resourceId = resourceId;
+ return this;
+ }
+
+ /**
+ * Get the name of the Storage queue under a storage account that is the destination of an event subscription.
+ *
+ * @return the queueName value
+ */
+ public String queueName() {
+ return this.queueName;
+ }
+
+ /**
+ * Set the name of the Storage queue under a storage account that is the destination of an event subscription.
+ *
+ * @param queueName the queueName value to set
+ * @return the StorageQueueEventSubscriptionDestination object itself.
+ */
+ public StorageQueueEventSubscriptionDestination withQueueName(String queueName) {
+ this.queueName = queueName;
+ return this;
+ }
+
+}
diff --git a/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/Topic.java b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/Topic.java
new file mode 100644
index 0000000000000..2bc12eedd796e
--- /dev/null
+++ b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/Topic.java
@@ -0,0 +1,78 @@
+/**
+ * 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.v2019_01_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.Resource;
+import com.microsoft.azure.arm.resources.models.GroupableResourceCore;
+import com.microsoft.azure.arm.resources.models.HasResourceGroup;
+import com.microsoft.azure.arm.model.Refreshable;
+import com.microsoft.azure.arm.model.Updatable;
+import com.microsoft.azure.arm.model.Appliable;
+import com.microsoft.azure.arm.model.Creatable;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.eventgrid.v2019_01_01.implementation.EventGridManager;
+import com.microsoft.azure.management.eventgrid.v2019_01_01.implementation.TopicInner;
+
+/**
+ * Type representing Topic.
+ */
+public interface Topic extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager {
+ /**
+ * @return the endpoint value.
+ */
+ String endpoint();
+
+ /**
+ * @return the provisioningState value.
+ */
+ TopicProvisioningState provisioningState();
+
+ /**
+ * The entirety of the Topic definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of Topic definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a Topic definition.
+ */
+ interface Blank extends GroupableResourceCore.DefinitionWithRegion {
+ }
+
+ /**
+ * The stage of the Topic definition allowing to specify the resource group.
+ */
+ interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup {
+ }
+
+ /**
+ * The stage of the definition which contains all the minimum required inputs for
+ * the resource to be created (via {@link WithCreate#create()}), but also allows
+ * for any other optional settings to be specified.
+ */
+ interface WithCreate extends Creatable, Resource.DefinitionWithTags {
+ }
+ }
+ /**
+ * The template for a Topic update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, Resource.UpdateWithTags {
+ }
+
+ /**
+ * Grouping of Topic update stages.
+ */
+ interface UpdateStages {
+ }
+}
diff --git a/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/TopicProvisioningState.java b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/TopicProvisioningState.java
new file mode 100644
index 0000000000000..59e8132249c88
--- /dev/null
+++ b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/TopicProvisioningState.java
@@ -0,0 +1,53 @@
+/**
+ * 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.v2019_01_01;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for TopicProvisioningState.
+ */
+public final class TopicProvisioningState extends ExpandableStringEnum {
+ /** Static value Creating for TopicProvisioningState. */
+ public static final TopicProvisioningState CREATING = fromString("Creating");
+
+ /** Static value Updating for TopicProvisioningState. */
+ public static final TopicProvisioningState UPDATING = fromString("Updating");
+
+ /** Static value Deleting for TopicProvisioningState. */
+ public static final TopicProvisioningState DELETING = fromString("Deleting");
+
+ /** Static value Succeeded for TopicProvisioningState. */
+ public static final TopicProvisioningState SUCCEEDED = fromString("Succeeded");
+
+ /** Static value Canceled for TopicProvisioningState. */
+ public static final TopicProvisioningState CANCELED = fromString("Canceled");
+
+ /** Static value Failed for TopicProvisioningState. */
+ public static final TopicProvisioningState FAILED = fromString("Failed");
+
+ /**
+ * Creates or finds a TopicProvisioningState from its string representation.
+ * @param name a name to look for
+ * @return the corresponding TopicProvisioningState
+ */
+ @JsonCreator
+ public static TopicProvisioningState fromString(String name) {
+ return fromString(name, TopicProvisioningState.class);
+ }
+
+ /**
+ * @return known TopicProvisioningState values
+ */
+ public static Collection values() {
+ return values(TopicProvisioningState.class);
+ }
+}
diff --git a/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/TopicRegenerateKeyRequest.java b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/TopicRegenerateKeyRequest.java
new file mode 100644
index 0000000000000..d1a0b6b35464e
--- /dev/null
+++ b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/TopicRegenerateKeyRequest.java
@@ -0,0 +1,43 @@
+/**
+ * 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.v2019_01_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Topic regenerate share access key request.
+ */
+public class TopicRegenerateKeyRequest {
+ /**
+ * Key name to regenerate key1 or key2.
+ */
+ @JsonProperty(value = "keyName", required = true)
+ private String keyName;
+
+ /**
+ * Get key name to regenerate key1 or key2.
+ *
+ * @return the keyName value
+ */
+ public String keyName() {
+ return this.keyName;
+ }
+
+ /**
+ * Set key name to regenerate key1 or key2.
+ *
+ * @param keyName the keyName value to set
+ * @return the TopicRegenerateKeyRequest object itself.
+ */
+ public TopicRegenerateKeyRequest withKeyName(String keyName) {
+ this.keyName = keyName;
+ return this;
+ }
+
+}
diff --git a/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/TopicSharedAccessKeys.java b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/TopicSharedAccessKeys.java
new file mode 100644
index 0000000000000..7b04df8be6c71
--- /dev/null
+++ b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/TopicSharedAccessKeys.java
@@ -0,0 +1,30 @@
+/**
+ * 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.v2019_01_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.eventgrid.v2019_01_01.implementation.EventGridManager;
+import com.microsoft.azure.management.eventgrid.v2019_01_01.implementation.TopicSharedAccessKeysInner;
+
+/**
+ * Type representing TopicSharedAccessKeys.
+ */
+public interface TopicSharedAccessKeys extends HasInner, HasManager {
+ /**
+ * @return the key1 value.
+ */
+ String key1();
+
+ /**
+ * @return the key2 value.
+ */
+ String key2();
+
+}
diff --git a/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/TopicTypeInfo.java b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/TopicTypeInfo.java
new file mode 100644
index 0000000000000..e9f3734f39a9d
--- /dev/null
+++ b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/TopicTypeInfo.java
@@ -0,0 +1,66 @@
+/**
+ * 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.v2019_01_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.eventgrid.v2019_01_01.implementation.EventGridManager;
+import com.microsoft.azure.management.eventgrid.v2019_01_01.implementation.TopicTypeInfoInner;
+import java.util.List;
+
+/**
+ * Type representing TopicTypeInfo.
+ */
+public interface TopicTypeInfo extends HasInner, HasManager {
+ /**
+ * @return the description value.
+ */
+ String description();
+
+ /**
+ * @return the displayName value.
+ */
+ String displayName();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the provider value.
+ */
+ String provider();
+
+ /**
+ * @return the provisioningState value.
+ */
+ TopicTypeProvisioningState provisioningState();
+
+ /**
+ * @return the resourceRegionType value.
+ */
+ ResourceRegionType resourceRegionType();
+
+ /**
+ * @return the supportedLocations value.
+ */
+ List supportedLocations();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+}
diff --git a/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/TopicTypeProvisioningState.java b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/TopicTypeProvisioningState.java
new file mode 100644
index 0000000000000..c1e3534b9c882
--- /dev/null
+++ b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/TopicTypeProvisioningState.java
@@ -0,0 +1,53 @@
+/**
+ * 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.v2019_01_01;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for TopicTypeProvisioningState.
+ */
+public final class TopicTypeProvisioningState extends ExpandableStringEnum {
+ /** Static value Creating for TopicTypeProvisioningState. */
+ public static final TopicTypeProvisioningState CREATING = fromString("Creating");
+
+ /** Static value Updating for TopicTypeProvisioningState. */
+ public static final TopicTypeProvisioningState UPDATING = fromString("Updating");
+
+ /** Static value Deleting for TopicTypeProvisioningState. */
+ public static final TopicTypeProvisioningState DELETING = fromString("Deleting");
+
+ /** Static value Succeeded for TopicTypeProvisioningState. */
+ public static final TopicTypeProvisioningState SUCCEEDED = fromString("Succeeded");
+
+ /** Static value Canceled for TopicTypeProvisioningState. */
+ public static final TopicTypeProvisioningState CANCELED = fromString("Canceled");
+
+ /** Static value Failed for TopicTypeProvisioningState. */
+ public static final TopicTypeProvisioningState FAILED = fromString("Failed");
+
+ /**
+ * Creates or finds a TopicTypeProvisioningState from its string representation.
+ * @param name a name to look for
+ * @return the corresponding TopicTypeProvisioningState
+ */
+ @JsonCreator
+ public static TopicTypeProvisioningState fromString(String name) {
+ return fromString(name, TopicTypeProvisioningState.class);
+ }
+
+ /**
+ * @return known TopicTypeProvisioningState values
+ */
+ public static Collection values() {
+ return values(TopicTypeProvisioningState.class);
+ }
+}
diff --git a/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/TopicTypes.java b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/TopicTypes.java
new file mode 100644
index 0000000000000..290da0dbf1fa9
--- /dev/null
+++ b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/TopicTypes.java
@@ -0,0 +1,48 @@
+/**
+ * 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.v2019_01_01;
+
+import rx.Observable;
+import com.microsoft.azure.management.eventgrid.v2019_01_01.implementation.TopicTypesInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing TopicTypes.
+ */
+public interface TopicTypes extends HasInner {
+ /**
+ * List event types.
+ * List event types for a topic type.
+ *
+ * @param topicTypeName Name of the topic type
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listEventTypesAsync(String topicTypeName);
+
+ /**
+ * Get a topic type.
+ * Get information about a topic type.
+ *
+ * @param topicTypeName Name of the topic type
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String topicTypeName);
+
+ /**
+ * List topic types.
+ * List all registered topic types.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listAsync();
+
+}
diff --git a/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/TopicUpdateParameters.java b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/TopicUpdateParameters.java
new file mode 100644
index 0000000000000..5f34bf7f0d3c7
--- /dev/null
+++ b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/TopicUpdateParameters.java
@@ -0,0 +1,44 @@
+/**
+ * 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.v2019_01_01;
+
+import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Properties of the Topic update.
+ */
+public class TopicUpdateParameters {
+ /**
+ * Tags of the resource.
+ */
+ @JsonProperty(value = "tags")
+ private Map tags;
+
+ /**
+ * Get tags of the resource.
+ *
+ * @return the tags value
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * Set tags of the resource.
+ *
+ * @param tags the tags value to set
+ * @return the TopicUpdateParameters object itself.
+ */
+ public TopicUpdateParameters withTags(Map tags) {
+ this.tags = tags;
+ return this;
+ }
+
+}
diff --git a/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/Topics.java b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/Topics.java
new file mode 100644
index 0000000000000..7e5cd04b8ab7f
--- /dev/null
+++ b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/Topics.java
@@ -0,0 +1,61 @@
+/**
+ * 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.v2019_01_01;
+
+import com.microsoft.azure.arm.collection.SupportsCreating;
+import com.microsoft.azure.arm.resources.collection.SupportsDeletingByResourceGroup;
+import com.microsoft.azure.arm.resources.collection.SupportsBatchDeletion;
+import com.microsoft.azure.arm.resources.collection.SupportsGettingByResourceGroup;
+import rx.Observable;
+import com.microsoft.azure.arm.resources.collection.SupportsListingByResourceGroup;
+import com.microsoft.azure.arm.collection.SupportsListing;
+import com.microsoft.azure.management.eventgrid.v2019_01_01.implementation.TopicsInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing Topics.
+ */
+public interface Topics extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner {
+ /**
+ * List keys for a topic.
+ * List the two keys used to publish to a topic.
+ *
+ * @param resourceGroupName The name of the resource group within the user's subscription.
+ * @param topicName Name of the topic
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listSharedAccessKeysAsync(String resourceGroupName, String topicName);
+
+ /**
+ * Regenerate key for a topic.
+ * Regenerate a shared access key for a topic.
+ *
+ * @param resourceGroupName The name of the resource group within the user's subscription.
+ * @param topicName Name of the topic
+ * @param keyName Key name to regenerate key1 or key2
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable regenerateKeyAsync(String resourceGroupName, String topicName, String keyName);
+
+ /**
+ * List topic event types.
+ * List event types for a topic.
+ *
+ * @param resourceGroupName The name of the resource group within the user's subscription.
+ * @param providerNamespace Namespace of the provider of the topic
+ * @param resourceTypeName Name of the topic type
+ * @param resourceName Name of the topic
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listEventTypesAsync(String resourceGroupName, String providerNamespace, String resourceTypeName, String resourceName);
+
+}
diff --git a/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/WebHookEventSubscriptionDestination.java b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/WebHookEventSubscriptionDestination.java
new file mode 100644
index 0000000000000..c47c80abd191b
--- /dev/null
+++ b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/WebHookEventSubscriptionDestination.java
@@ -0,0 +1,66 @@
+/**
+ * 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.v2019_01_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.microsoft.rest.serializer.JsonFlatten;
+
+/**
+ * Information about the webhook destination for an event subscription.
+ */
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType")
+@JsonTypeName("WebHook")
+@JsonFlatten
+public class WebHookEventSubscriptionDestination extends EventSubscriptionDestination {
+ /**
+ * The URL that represents the endpoint of the destination of an event
+ * subscription.
+ */
+ @JsonProperty(value = "properties.endpointUrl")
+ private String endpointUrl;
+
+ /**
+ * The base URL that represents the endpoint of the destination of an event
+ * subscription.
+ */
+ @JsonProperty(value = "properties.endpointBaseUrl", access = JsonProperty.Access.WRITE_ONLY)
+ private String endpointBaseUrl;
+
+ /**
+ * Get the URL that represents the endpoint of the destination of an event subscription.
+ *
+ * @return the endpointUrl value
+ */
+ public String endpointUrl() {
+ return this.endpointUrl;
+ }
+
+ /**
+ * Set the URL that represents the endpoint of the destination of an event subscription.
+ *
+ * @param endpointUrl the endpointUrl value to set
+ * @return the WebHookEventSubscriptionDestination object itself.
+ */
+ public WebHookEventSubscriptionDestination withEndpointUrl(String endpointUrl) {
+ this.endpointUrl = endpointUrl;
+ return this;
+ }
+
+ /**
+ * Get the base URL that represents the endpoint of the destination of an event subscription.
+ *
+ * @return the endpointBaseUrl value
+ */
+ public String endpointBaseUrl() {
+ return this.endpointBaseUrl;
+ }
+
+}
diff --git a/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/implementation/EventGridManagementClientImpl.java b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/implementation/EventGridManagementClientImpl.java
new file mode 100644
index 0000000000000..0e37ae4ac5b80
--- /dev/null
+++ b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/implementation/EventGridManagementClientImpl.java
@@ -0,0 +1,238 @@
+/**
+ * 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.v2019_01_01.implementation;
+
+import com.microsoft.azure.AzureClient;
+import com.microsoft.azure.AzureServiceClient;
+import com.microsoft.rest.credentials.ServiceClientCredentials;
+import com.microsoft.rest.RestClient;
+
+/**
+ * Initializes a new instance of the EventGridManagementClientImpl class.
+ */
+public class EventGridManagementClientImpl extends AzureServiceClient {
+ /** the {@link AzureClient} used for long running operations. */
+ private AzureClient azureClient;
+
+ /**
+ * Gets the {@link AzureClient} used for long running operations.
+ * @return the azure client;
+ */
+ public AzureClient getAzureClient() {
+ return this.azureClient;
+ }
+
+ /** Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. */
+ private String subscriptionId;
+
+ /**
+ * Gets Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
+ *
+ * @return the subscriptionId value.
+ */
+ public String subscriptionId() {
+ return this.subscriptionId;
+ }
+
+ /**
+ * Sets Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
+ *
+ * @param subscriptionId the subscriptionId value.
+ * @return the service client itself
+ */
+ public EventGridManagementClientImpl withSubscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
+ return this;
+ }
+
+ /** Version of the API to be used with the client request. */
+ private String apiVersion;
+
+ /**
+ * Gets Version of the API to be used with the client request.
+ *
+ * @return the apiVersion value.
+ */
+ public String apiVersion() {
+ return this.apiVersion;
+ }
+
+ /** The preferred language for the response. */
+ private String acceptLanguage;
+
+ /**
+ * Gets The preferred language for the response.
+ *
+ * @return the acceptLanguage value.
+ */
+ public String acceptLanguage() {
+ return this.acceptLanguage;
+ }
+
+ /**
+ * Sets The preferred language for the response.
+ *
+ * @param acceptLanguage the acceptLanguage value.
+ * @return the service client itself
+ */
+ public EventGridManagementClientImpl withAcceptLanguage(String acceptLanguage) {
+ this.acceptLanguage = acceptLanguage;
+ return this;
+ }
+
+ /** The retry timeout in seconds for Long Running Operations. Default value is 30. */
+ private int longRunningOperationRetryTimeout;
+
+ /**
+ * Gets The retry timeout in seconds for Long Running Operations. Default value is 30.
+ *
+ * @return the longRunningOperationRetryTimeout value.
+ */
+ public int longRunningOperationRetryTimeout() {
+ return this.longRunningOperationRetryTimeout;
+ }
+
+ /**
+ * Sets The retry timeout in seconds for Long Running Operations. Default value is 30.
+ *
+ * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value.
+ * @return the service client itself
+ */
+ public EventGridManagementClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) {
+ this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout;
+ return this;
+ }
+
+ /** Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */
+ private boolean generateClientRequestId;
+
+ /**
+ * Gets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
+ *
+ * @return the generateClientRequestId value.
+ */
+ public boolean generateClientRequestId() {
+ return this.generateClientRequestId;
+ }
+
+ /**
+ * Sets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
+ *
+ * @param generateClientRequestId the generateClientRequestId value.
+ * @return the service client itself
+ */
+ public EventGridManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) {
+ this.generateClientRequestId = generateClientRequestId;
+ return this;
+ }
+
+ /**
+ * The EventSubscriptionsInner object to access its operations.
+ */
+ private EventSubscriptionsInner eventSubscriptions;
+
+ /**
+ * Gets the EventSubscriptionsInner object to access its operations.
+ * @return the EventSubscriptionsInner object.
+ */
+ public EventSubscriptionsInner eventSubscriptions() {
+ return this.eventSubscriptions;
+ }
+
+ /**
+ * The OperationsInner object to access its operations.
+ */
+ private OperationsInner operations;
+
+ /**
+ * Gets the OperationsInner object to access its operations.
+ * @return the OperationsInner object.
+ */
+ public OperationsInner operations() {
+ return this.operations;
+ }
+
+ /**
+ * The TopicsInner object to access its operations.
+ */
+ private TopicsInner topics;
+
+ /**
+ * Gets the TopicsInner object to access its operations.
+ * @return the TopicsInner object.
+ */
+ public TopicsInner topics() {
+ return this.topics;
+ }
+
+ /**
+ * The TopicTypesInner object to access its operations.
+ */
+ private TopicTypesInner topicTypes;
+
+ /**
+ * Gets the TopicTypesInner object to access its operations.
+ * @return the TopicTypesInner object.
+ */
+ public TopicTypesInner topicTypes() {
+ return this.topicTypes;
+ }
+
+ /**
+ * Initializes an instance of EventGridManagementClient client.
+ *
+ * @param credentials the management credentials for Azure
+ */
+ public EventGridManagementClientImpl(ServiceClientCredentials credentials) {
+ this("https://management.azure.com", credentials);
+ }
+
+ /**
+ * Initializes an instance of EventGridManagementClient client.
+ *
+ * @param baseUrl the base URL of the host
+ * @param credentials the management credentials for Azure
+ */
+ public EventGridManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) {
+ super(baseUrl, credentials);
+ initialize();
+ }
+
+ /**
+ * Initializes an instance of EventGridManagementClient client.
+ *
+ * @param restClient the REST client to connect to Azure.
+ */
+ public EventGridManagementClientImpl(RestClient restClient) {
+ super(restClient);
+ initialize();
+ }
+
+ protected void initialize() {
+ this.apiVersion = "2019-01-01";
+ this.acceptLanguage = "en-US";
+ this.longRunningOperationRetryTimeout = 30;
+ this.generateClientRequestId = true;
+ this.eventSubscriptions = new EventSubscriptionsInner(restClient().retrofit(), this);
+ this.operations = new OperationsInner(restClient().retrofit(), this);
+ this.topics = new TopicsInner(restClient().retrofit(), this);
+ this.topicTypes = new TopicTypesInner(restClient().retrofit(), this);
+ this.azureClient = new AzureClient(this);
+ }
+
+ /**
+ * Gets the User-Agent header for the client.
+ *
+ * @return the user agent string.
+ */
+ @Override
+ public String userAgent() {
+ return String.format("%s (%s, %s, auto-generated)", super.userAgent(), "EventGridManagementClient", "2019-01-01");
+ }
+}
diff --git a/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/implementation/EventGridManager.java b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/implementation/EventGridManager.java
new file mode 100644
index 0000000000000..d72633579c7a7
--- /dev/null
+++ b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/implementation/EventGridManager.java
@@ -0,0 +1,135 @@
+/**
+ * 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.v2019_01_01.implementation;
+
+import com.microsoft.azure.AzureEnvironment;
+import com.microsoft.azure.AzureResponseBuilder;
+import com.microsoft.azure.credentials.AzureTokenCredentials;
+import com.microsoft.azure.management.apigeneration.Beta;
+import com.microsoft.azure.management.apigeneration.Beta.SinceVersion;
+import com.microsoft.azure.arm.resources.AzureConfigurable;
+import com.microsoft.azure.serializer.AzureJacksonAdapter;
+import com.microsoft.rest.RestClient;
+import com.microsoft.azure.management.eventgrid.v2019_01_01.EventSubscriptions;
+import com.microsoft.azure.management.eventgrid.v2019_01_01.Operations;
+import com.microsoft.azure.management.eventgrid.v2019_01_01.Topics;
+import com.microsoft.azure.management.eventgrid.v2019_01_01.TopicTypes;
+import com.microsoft.azure.arm.resources.implementation.AzureConfigurableCoreImpl;
+import com.microsoft.azure.arm.resources.implementation.ManagerCore;
+
+/**
+ * Entry point to Azure EventGrid resource management.
+ */
+public final class EventGridManager extends ManagerCore {
+ private EventSubscriptions eventSubscriptions;
+ private Operations operations;
+ private Topics topics;
+ private TopicTypes topicTypes;
+ /**
+ * Get a Configurable instance that can be used to create EventGridManager with optional configuration.
+ *
+ * @return the instance allowing configurations
+ */
+ public static Configurable configure() {
+ return new EventGridManager.ConfigurableImpl();
+ }
+ /**
+ * Creates an instance of EventGridManager that exposes EventGrid resource management API entry points.
+ *
+ * @param credentials the credentials to use
+ * @param subscriptionId the subscription UUID
+ * @return the EventGridManager
+ */
+ public static EventGridManager authenticate(AzureTokenCredentials credentials, String subscriptionId) {
+ return new EventGridManager(new RestClient.Builder()
+ .withBaseUrl(credentials.environment(), AzureEnvironment.Endpoint.RESOURCE_MANAGER)
+ .withCredentials(credentials)
+ .withSerializerAdapter(new AzureJacksonAdapter())
+ .withResponseBuilderFactory(new AzureResponseBuilder.Factory())
+ .build(), subscriptionId);
+ }
+ /**
+ * Creates an instance of EventGridManager that exposes EventGrid resource management API entry points.
+ *
+ * @param restClient the RestClient to be used for API calls.
+ * @param subscriptionId the subscription UUID
+ * @return the EventGridManager
+ */
+ public static EventGridManager authenticate(RestClient restClient, String subscriptionId) {
+ return new EventGridManager(restClient, subscriptionId);
+ }
+ /**
+ * The interface allowing configurations to be set.
+ */
+ public interface Configurable extends AzureConfigurable {
+ /**
+ * Creates an instance of EventGridManager that exposes EventGrid management API entry points.
+ *
+ * @param credentials the credentials to use
+ * @param subscriptionId the subscription UUID
+ * @return the interface exposing EventGrid management API entry points that work across subscriptions
+ */
+ EventGridManager authenticate(AzureTokenCredentials credentials, String subscriptionId);
+ }
+
+ /**
+ * @return Entry point to manage EventSubscriptions.
+ */
+ public EventSubscriptions eventSubscriptions() {
+ if (this.eventSubscriptions == null) {
+ this.eventSubscriptions = new EventSubscriptionsImpl(this);
+ }
+ return this.eventSubscriptions;
+ }
+
+ /**
+ * @return Entry point to manage Operations.
+ */
+ public Operations operations() {
+ if (this.operations == null) {
+ this.operations = new OperationsImpl(this);
+ }
+ return this.operations;
+ }
+
+ /**
+ * @return Entry point to manage Topics.
+ */
+ public Topics topics() {
+ if (this.topics == null) {
+ this.topics = new TopicsImpl(this);
+ }
+ return this.topics;
+ }
+
+ /**
+ * @return Entry point to manage TopicTypes.
+ */
+ public TopicTypes topicTypes() {
+ if (this.topicTypes == null) {
+ this.topicTypes = new TopicTypesImpl(this);
+ }
+ return this.topicTypes;
+ }
+
+ /**
+ * The implementation for Configurable interface.
+ */
+ private static final class ConfigurableImpl extends AzureConfigurableCoreImpl implements Configurable {
+ public EventGridManager authenticate(AzureTokenCredentials credentials, String subscriptionId) {
+ return EventGridManager.authenticate(buildRestClient(credentials), subscriptionId);
+ }
+ }
+ private EventGridManager(RestClient restClient, String subscriptionId) {
+ super(
+ restClient,
+ subscriptionId,
+ new EventGridManagementClientImpl(restClient).withSubscriptionId(subscriptionId));
+ }
+}
diff --git a/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/implementation/EventSubscriptionFullUrlImpl.java b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/implementation/EventSubscriptionFullUrlImpl.java
new file mode 100644
index 0000000000000..15c632157896d
--- /dev/null
+++ b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/implementation/EventSubscriptionFullUrlImpl.java
@@ -0,0 +1,31 @@
+/**
+ * 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.v2019_01_01.implementation;
+
+import com.microsoft.azure.management.eventgrid.v2019_01_01.EventSubscriptionFullUrl;
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+
+class EventSubscriptionFullUrlImpl extends WrapperImpl implements EventSubscriptionFullUrl {
+ private final EventGridManager manager;
+ EventSubscriptionFullUrlImpl(EventSubscriptionFullUrlInner inner, EventGridManager manager) {
+ super(inner);
+ this.manager = manager;
+ }
+
+ @Override
+ public EventGridManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public String endpointUrl() {
+ return this.inner().endpointUrl();
+ }
+
+}
diff --git a/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/implementation/EventSubscriptionFullUrlInner.java b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/implementation/EventSubscriptionFullUrlInner.java
new file mode 100644
index 0000000000000..c3b9cf76ed4cf
--- /dev/null
+++ b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/implementation/EventSubscriptionFullUrlInner.java
@@ -0,0 +1,44 @@
+/**
+ * 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.v2019_01_01.implementation;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Full endpoint url of an event subscription.
+ */
+public class EventSubscriptionFullUrlInner {
+ /**
+ * The URL that represents the endpoint of the destination of an event
+ * subscription.
+ */
+ @JsonProperty(value = "endpointUrl")
+ private String endpointUrl;
+
+ /**
+ * Get the URL that represents the endpoint of the destination of an event subscription.
+ *
+ * @return the endpointUrl value
+ */
+ public String endpointUrl() {
+ return this.endpointUrl;
+ }
+
+ /**
+ * Set the URL that represents the endpoint of the destination of an event subscription.
+ *
+ * @param endpointUrl the endpointUrl value to set
+ * @return the EventSubscriptionFullUrlInner object itself.
+ */
+ public EventSubscriptionFullUrlInner withEndpointUrl(String endpointUrl) {
+ this.endpointUrl = endpointUrl;
+ return this;
+ }
+
+}
diff --git a/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/implementation/EventSubscriptionImpl.java b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/implementation/EventSubscriptionImpl.java
new file mode 100644
index 0000000000000..7de0c2cede5fe
--- /dev/null
+++ b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/implementation/EventSubscriptionImpl.java
@@ -0,0 +1,205 @@
+/**
+ * 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.v2019_01_01.implementation;
+
+import com.microsoft.azure.management.eventgrid.v2019_01_01.EventSubscription;
+import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl;
+import rx.Observable;
+import com.microsoft.azure.management.eventgrid.v2019_01_01.EventSubscriptionUpdateParameters;
+import java.util.List;
+import com.microsoft.azure.management.eventgrid.v2019_01_01.EventSubscriptionProvisioningState;
+import com.microsoft.azure.management.eventgrid.v2019_01_01.EventSubscriptionDestination;
+import com.microsoft.azure.management.eventgrid.v2019_01_01.EventSubscriptionFilter;
+import com.microsoft.azure.management.eventgrid.v2019_01_01.RetryPolicy;
+import com.microsoft.azure.management.eventgrid.v2019_01_01.DeadLetterDestination;
+import rx.functions.Func1;
+
+class EventSubscriptionImpl extends CreatableUpdatableImpl implements EventSubscription, EventSubscription.Definition, EventSubscription.Update {
+ private String scope;
+ private String eventSubscriptionName;
+ private EventSubscriptionUpdateParameters updateParameter;
+ private final EventGridManager manager;
+
+ EventSubscriptionImpl(String name, EventGridManager manager) {
+ super(name, new EventSubscriptionInner());
+ this.manager = manager;
+ // Set resource name
+ this.eventSubscriptionName = name;
+ //
+ this.updateParameter = new EventSubscriptionUpdateParameters();
+ }
+
+ EventSubscriptionImpl(EventSubscriptionInner inner, EventGridManager manager) {
+ super(inner.name(), inner);
+ this.manager = manager;
+ // Set resource name
+ this.eventSubscriptionName = inner.name();
+ // set resource ancestor and positional variables
+ this.eventSubscriptionName = IdParsingUtils.getValueFromIdByName(inner.id(), "eventSubscriptions");
+ this.scope = IdParsingUtils.getValueFromIdByPosition(inner.id(), 0);
+ // set other parameters for create and update
+ this.updateParameter = new EventSubscriptionUpdateParameters();
+ }
+
+ @Override
+ public EventGridManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public Observable createResourceAsync() {
+ EventSubscriptionsInner client = this.manager().inner().eventSubscriptions();
+ return client.createOrUpdateAsync(this.scope, this.eventSubscriptionName, this.inner())
+ .map(new Func1() {
+ @Override
+ public EventSubscriptionInner call(EventSubscriptionInner resource) {
+ resetCreateUpdateParameters();
+ return resource;
+ }
+ })
+ .map(innerToFluentMap(this));
+ }
+
+ @Override
+ public Observable updateResourceAsync() {
+ EventSubscriptionsInner client = this.manager().inner().eventSubscriptions();
+ return client.updateAsync(this.scope, this.eventSubscriptionName, this.updateParameter)
+ .map(new Func1() {
+ @Override
+ public EventSubscriptionInner call(EventSubscriptionInner resource) {
+ resetCreateUpdateParameters();
+ return resource;
+ }
+ })
+ .map(innerToFluentMap(this));
+ }
+
+ @Override
+ protected Observable getInnerAsync() {
+ EventSubscriptionsInner client = this.manager().inner().eventSubscriptions();
+ return client.getAsync(this.scope, this.eventSubscriptionName);
+ }
+
+ @Override
+ public boolean isInCreateMode() {
+ return this.inner().id() == null;
+ }
+
+ private void resetCreateUpdateParameters() {
+ this.updateParameter = new EventSubscriptionUpdateParameters();
+ }
+
+ @Override
+ public DeadLetterDestination deadLetterDestination() {
+ return this.inner().deadLetterDestination();
+ }
+
+ @Override
+ public EventSubscriptionDestination destination() {
+ return this.inner().destination();
+ }
+
+ @Override
+ public EventSubscriptionFilter filter() {
+ return this.inner().filter();
+ }
+
+ @Override
+ public String id() {
+ return this.inner().id();
+ }
+
+ @Override
+ public List labels() {
+ return this.inner().labels();
+ }
+
+ @Override
+ public String name() {
+ return this.inner().name();
+ }
+
+ @Override
+ public EventSubscriptionProvisioningState provisioningState() {
+ return this.inner().provisioningState();
+ }
+
+ @Override
+ public RetryPolicy retryPolicy() {
+ return this.inner().retryPolicy();
+ }
+
+ @Override
+ public String topic() {
+ return this.inner().topic();
+ }
+
+ @Override
+ public String type() {
+ return this.inner().type();
+ }
+
+ @Override
+ public EventSubscriptionImpl withScope(String scope) {
+ this.scope = scope;
+ return this;
+ }
+
+ @Override
+ public EventSubscriptionImpl withDeadLetterDestination(DeadLetterDestination deadLetterDestination) {
+ if (isInCreateMode()) {
+ this.inner().withDeadLetterDestination(deadLetterDestination);
+ } else {
+ this.updateParameter.withDeadLetterDestination(deadLetterDestination);
+ }
+ return this;
+ }
+
+ @Override
+ public EventSubscriptionImpl withDestination(EventSubscriptionDestination destination) {
+ if (isInCreateMode()) {
+ this.inner().withDestination(destination);
+ } else {
+ this.updateParameter.withDestination(destination);
+ }
+ return this;
+ }
+
+ @Override
+ public EventSubscriptionImpl withFilter(EventSubscriptionFilter filter) {
+ if (isInCreateMode()) {
+ this.inner().withFilter(filter);
+ } else {
+ this.updateParameter.withFilter(filter);
+ }
+ return this;
+ }
+
+ @Override
+ public EventSubscriptionImpl withLabels(List labels) {
+ if (isInCreateMode()) {
+ this.inner().withLabels(labels);
+ } else {
+ this.updateParameter.withLabels(labels);
+ }
+ return this;
+ }
+
+ @Override
+ public EventSubscriptionImpl withRetryPolicy(RetryPolicy retryPolicy) {
+ if (isInCreateMode()) {
+ this.inner().withRetryPolicy(retryPolicy);
+ } else {
+ this.updateParameter.withRetryPolicy(retryPolicy);
+ }
+ return this;
+ }
+
+}
diff --git a/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/implementation/EventSubscriptionInner.java b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/implementation/EventSubscriptionInner.java
new file mode 100644
index 0000000000000..6d08216570639
--- /dev/null
+++ b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/implementation/EventSubscriptionInner.java
@@ -0,0 +1,190 @@
+/**
+ * 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.v2019_01_01.implementation;
+
+import com.microsoft.azure.management.eventgrid.v2019_01_01.EventSubscriptionProvisioningState;
+import com.microsoft.azure.management.eventgrid.v2019_01_01.EventSubscriptionDestination;
+import com.microsoft.azure.management.eventgrid.v2019_01_01.EventSubscriptionFilter;
+import java.util.List;
+import com.microsoft.azure.management.eventgrid.v2019_01_01.RetryPolicy;
+import com.microsoft.azure.management.eventgrid.v2019_01_01.DeadLetterDestination;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.rest.serializer.JsonFlatten;
+import com.microsoft.azure.ProxyResource;
+
+/**
+ * Event Subscription.
+ */
+@JsonFlatten
+public class EventSubscriptionInner extends ProxyResource {
+ /**
+ * Name of the topic of the event subscription.
+ */
+ @JsonProperty(value = "properties.topic", access = JsonProperty.Access.WRITE_ONLY)
+ private String topic;
+
+ /**
+ * Provisioning state of the event subscription. Possible values include:
+ * 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Canceled', 'Failed',
+ * 'AwaitingManualAction'.
+ */
+ @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private EventSubscriptionProvisioningState provisioningState;
+
+ /**
+ * Information about the destination where events have to be delivered for
+ * the event subscription.
+ */
+ @JsonProperty(value = "properties.destination")
+ private EventSubscriptionDestination destination;
+
+ /**
+ * Information about the filter for the event subscription.
+ */
+ @JsonProperty(value = "properties.filter")
+ private EventSubscriptionFilter filter;
+
+ /**
+ * List of user defined labels.
+ */
+ @JsonProperty(value = "properties.labels")
+ private List labels;
+
+ /**
+ * The retry policy for events. This can be used to configure maximum
+ * number of delivery attempts and time to live for events.
+ */
+ @JsonProperty(value = "properties.retryPolicy")
+ private RetryPolicy retryPolicy;
+
+ /**
+ * The DeadLetter destination of the event subscription.
+ */
+ @JsonProperty(value = "properties.deadLetterDestination")
+ private DeadLetterDestination deadLetterDestination;
+
+ /**
+ * Get name of the topic of the event subscription.
+ *
+ * @return the topic value
+ */
+ public String topic() {
+ return this.topic;
+ }
+
+ /**
+ * Get provisioning state of the event subscription. Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Canceled', 'Failed', 'AwaitingManualAction'.
+ *
+ * @return the provisioningState value
+ */
+ public EventSubscriptionProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get information about the destination where events have to be delivered for the event subscription.
+ *
+ * @return the destination value
+ */
+ public EventSubscriptionDestination destination() {
+ return this.destination;
+ }
+
+ /**
+ * Set information about the destination where events have to be delivered for the event subscription.
+ *
+ * @param destination the destination value to set
+ * @return the EventSubscriptionInner object itself.
+ */
+ public EventSubscriptionInner withDestination(EventSubscriptionDestination destination) {
+ this.destination = destination;
+ return this;
+ }
+
+ /**
+ * Get information about the filter for the event subscription.
+ *
+ * @return the filter value
+ */
+ public EventSubscriptionFilter filter() {
+ return this.filter;
+ }
+
+ /**
+ * Set information about the filter for the event subscription.
+ *
+ * @param filter the filter value to set
+ * @return the EventSubscriptionInner object itself.
+ */
+ public EventSubscriptionInner withFilter(EventSubscriptionFilter filter) {
+ this.filter = filter;
+ return this;
+ }
+
+ /**
+ * Get list of user defined labels.
+ *
+ * @return the labels value
+ */
+ public List labels() {
+ return this.labels;
+ }
+
+ /**
+ * Set list of user defined labels.
+ *
+ * @param labels the labels value to set
+ * @return the EventSubscriptionInner object itself.
+ */
+ public EventSubscriptionInner withLabels(List labels) {
+ this.labels = labels;
+ return this;
+ }
+
+ /**
+ * Get the retry policy for events. This can be used to configure maximum number of delivery attempts and time to live for events.
+ *
+ * @return the retryPolicy value
+ */
+ public RetryPolicy retryPolicy() {
+ return this.retryPolicy;
+ }
+
+ /**
+ * Set the retry policy for events. This can be used to configure maximum number of delivery attempts and time to live for events.
+ *
+ * @param retryPolicy the retryPolicy value to set
+ * @return the EventSubscriptionInner object itself.
+ */
+ public EventSubscriptionInner withRetryPolicy(RetryPolicy retryPolicy) {
+ this.retryPolicy = retryPolicy;
+ return this;
+ }
+
+ /**
+ * Get the DeadLetter destination of the event subscription.
+ *
+ * @return the deadLetterDestination value
+ */
+ public DeadLetterDestination deadLetterDestination() {
+ return this.deadLetterDestination;
+ }
+
+ /**
+ * Set the DeadLetter destination of the event subscription.
+ *
+ * @param deadLetterDestination the deadLetterDestination value to set
+ * @return the EventSubscriptionInner object itself.
+ */
+ public EventSubscriptionInner withDeadLetterDestination(DeadLetterDestination deadLetterDestination) {
+ this.deadLetterDestination = deadLetterDestination;
+ return this;
+ }
+
+}
diff --git a/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/implementation/EventSubscriptionsImpl.java b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/implementation/EventSubscriptionsImpl.java
new file mode 100644
index 0000000000000..e6737fe673956
--- /dev/null
+++ b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/implementation/EventSubscriptionsImpl.java
@@ -0,0 +1,260 @@
+/**
+ * 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.
+ * jkl
+ */
+
+package com.microsoft.azure.management.eventgrid.v2019_01_01.implementation;
+
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.eventgrid.v2019_01_01.EventSubscriptions;
+import rx.Observable;
+import rx.functions.Func1;
+import com.microsoft.azure.PagedList;
+import com.microsoft.azure.Page;
+import rx.Completable;
+import java.util.List;
+import com.microsoft.azure.management.eventgrid.v2019_01_01.EventSubscription;
+import com.microsoft.azure.management.eventgrid.v2019_01_01.EventSubscriptionFullUrl;
+import com.microsoft.azure.arm.utils.PagedListConverter;
+
+class EventSubscriptionsImpl extends WrapperImpl implements EventSubscriptions {
+ private PagedListConverter converter;
+ private final EventGridManager manager;
+
+ EventSubscriptionsImpl(EventGridManager manager) {
+ super(manager.inner().eventSubscriptions());
+ this.manager = manager;
+ this.converter = new PagedListConverter() {
+ @Override
+ public Observable typeConvertAsync(EventSubscriptionInner inner) {
+ return Observable.just((EventSubscription) wrapModel(inner));
+ }
+ };
+ }
+
+ public EventGridManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public EventSubscriptionImpl define(String name) {
+ return wrapModel(name);
+ }
+
+ private EventSubscriptionImpl wrapModel(EventSubscriptionInner inner) {
+ return new EventSubscriptionImpl(inner, manager());
+ }
+
+ private EventSubscriptionImpl wrapModel(String name) {
+ return new EventSubscriptionImpl(name, this.manager());
+ }
+
+ @Override
+ public Observable getAsync(String scope, String eventSubscriptionName) {
+ EventSubscriptionsInner client = this.inner();
+ return client.getAsync(scope, eventSubscriptionName)
+ .map(new Func1() {
+ @Override
+ public EventSubscription call(EventSubscriptionInner inner) {
+ return new EventSubscriptionImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Completable deleteAsync(String scope, String eventSubscriptionName) {
+ EventSubscriptionsInner client = this.inner();
+ return client.deleteAsync(scope, eventSubscriptionName).toCompletable();
+ }
+
+ @Override
+ public Observable getFullUrlAsync(String scope, String eventSubscriptionName) {
+ EventSubscriptionsInner client = this.inner();
+ return client.getFullUrlAsync(scope, eventSubscriptionName)
+ .map(new Func1() {
+ @Override
+ public EventSubscriptionFullUrl call(EventSubscriptionFullUrlInner inner) {
+ return new EventSubscriptionFullUrlImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Observable listGlobalBySubscriptionForTopicTypeAsync(String topicTypeName) {
+ EventSubscriptionsInner client = this.inner();
+ return client.listGlobalBySubscriptionForTopicTypeAsync(topicTypeName)
+ .flatMap(new Func1, Observable>() {
+ @Override
+ public Observable call(List innerList) {
+ return Observable.from(innerList);
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public EventSubscription call(EventSubscriptionInner inner) {
+ return new EventSubscriptionImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Observable listGlobalByResourceGroupForTopicTypeAsync(String resourceGroupName, String topicTypeName) {
+ EventSubscriptionsInner client = this.inner();
+ return client.listGlobalByResourceGroupForTopicTypeAsync(resourceGroupName, topicTypeName)
+ .flatMap(new Func1, Observable>() {
+ @Override
+ public Observable call(List innerList) {
+ return Observable.from(innerList);
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public EventSubscription call(EventSubscriptionInner inner) {
+ return new EventSubscriptionImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Observable listRegionalBySubscriptionAsync(String location) {
+ EventSubscriptionsInner client = this.inner();
+ return client.listRegionalBySubscriptionAsync(location)
+ .flatMap(new Func1, Observable>() {
+ @Override
+ public Observable call(List innerList) {
+ return Observable.from(innerList);
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public EventSubscription call(EventSubscriptionInner inner) {
+ return new EventSubscriptionImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Observable listRegionalByResourceGroupAsync(String resourceGroupName, String location) {
+ EventSubscriptionsInner client = this.inner();
+ return client.listRegionalByResourceGroupAsync(resourceGroupName, location)
+ .flatMap(new Func1, Observable>() {
+ @Override
+ public Observable call(List innerList) {
+ return Observable.from(innerList);
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public EventSubscription call(EventSubscriptionInner inner) {
+ return new EventSubscriptionImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Observable listRegionalBySubscriptionForTopicTypeAsync(String location, String topicTypeName) {
+ EventSubscriptionsInner client = this.inner();
+ return client.listRegionalBySubscriptionForTopicTypeAsync(location, topicTypeName)
+ .flatMap(new Func1, Observable>() {
+ @Override
+ public Observable call(List innerList) {
+ return Observable.from(innerList);
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public EventSubscription call(EventSubscriptionInner inner) {
+ return new EventSubscriptionImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Observable listRegionalByResourceGroupForTopicTypeAsync(String resourceGroupName, String location, String topicTypeName) {
+ EventSubscriptionsInner client = this.inner();
+ return client.listRegionalByResourceGroupForTopicTypeAsync(resourceGroupName, location, topicTypeName)
+ .flatMap(new Func1, Observable>() {
+ @Override
+ public Observable call(List innerList) {
+ return Observable.from(innerList);
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public EventSubscription call(EventSubscriptionInner inner) {
+ return new EventSubscriptionImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Observable listByResourceAsync(String resourceGroupName, String providerNamespace, String resourceTypeName, String resourceName) {
+ EventSubscriptionsInner client = this.inner();
+ return client.listByResourceAsync(resourceGroupName, providerNamespace, resourceTypeName, resourceName)
+ .flatMap(new Func1, Observable>() {
+ @Override
+ public Observable call(List innerList) {
+ return Observable.from(innerList);
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public EventSubscription call(EventSubscriptionInner inner) {
+ return new EventSubscriptionImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public PagedList list() {
+ EventSubscriptionsInner client = this.inner();
+ return converter.convert(client.list());
+ }
+
+ @Override
+ public Observable listAsync() {
+ EventSubscriptionsInner client = this.inner();
+ return client.listAsync()
+ .flatMap(new Func1, Observable>() {
+ @Override
+ public Observable call(Page innerPage) {
+ return Observable.from(innerPage.items());
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public EventSubscription call(EventSubscriptionInner inner) {
+ return wrapModel(inner);
+ }
+ });
+ }
+
+ @Override
+ public PagedList listByResourceGroup(String resourceGroupName) {
+ EventSubscriptionsInner client = this.inner();
+ return converter.convert(client.listByResourceGroup(resourceGroupName));
+ }
+
+ @Override
+ public Observable listByResourceGroupAsync(String resourceGroupName) {
+ EventSubscriptionsInner client = this.inner();
+ return client.listByResourceGroupAsync(resourceGroupName)
+ .flatMap(new Func1, Observable>() {
+ @Override
+ public Observable call(Page innerPage) {
+ return Observable.from(innerPage.items());
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public EventSubscription call(EventSubscriptionInner inner) {
+ return wrapModel(inner);
+ }
+ });
+ }
+
+}
diff --git a/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/implementation/EventSubscriptionsInner.java b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/implementation/EventSubscriptionsInner.java
new file mode 100644
index 0000000000000..4c381adf503b8
--- /dev/null
+++ b/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/implementation/EventSubscriptionsInner.java
@@ -0,0 +1,1662 @@
+/**
+ * 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.v2019_01_01.implementation;
+
+import com.microsoft.azure.arm.collection.InnerSupportsDelete;
+import com.microsoft.azure.arm.collection.InnerSupportsListing;
+import retrofit2.Retrofit;
+import com.google.common.reflect.TypeToken;
+import com.microsoft.azure.CloudException;
+import com.microsoft.azure.management.eventgrid.v2019_01_01.EventSubscriptionUpdateParameters;
+import com.microsoft.azure.Page;
+import com.microsoft.azure.PagedList;
+import com.microsoft.rest.ServiceCallback;
+import com.microsoft.rest.ServiceFuture;
+import com.microsoft.rest.ServiceResponse;
+import com.microsoft.rest.Validator;
+import java.io.IOException;
+import java.util.List;
+import okhttp3.ResponseBody;
+import retrofit2.http.Body;
+import retrofit2.http.GET;
+import retrofit2.http.Header;
+import retrofit2.http.Headers;
+import retrofit2.http.HTTP;
+import retrofit2.http.PATCH;
+import retrofit2.http.Path;
+import retrofit2.http.POST;
+import retrofit2.http.PUT;
+import retrofit2.http.Query;
+import retrofit2.Response;
+import rx.functions.Func1;
+import rx.Observable;
+
+/**
+ * An instance of this class provides access to all the operations defined
+ * in EventSubscriptions.
+ */
+public class EventSubscriptionsInner implements InnerSupportsDelete, InnerSupportsListing {
+ /** The Retrofit service to perform REST calls. */
+ private EventSubscriptionsService service;
+ /** The service client containing this operation class. */
+ private EventGridManagementClientImpl client;
+
+ /**
+ * Initializes an instance of EventSubscriptionsInner.
+ *
+ * @param retrofit the Retrofit instance built from a Retrofit Builder.
+ * @param client the instance of the service client containing this operation class.
+ */
+ public EventSubscriptionsInner(Retrofit retrofit, EventGridManagementClientImpl client) {
+ this.service = retrofit.create(EventSubscriptionsService.class);
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for EventSubscriptions to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface EventSubscriptionsService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventgrid.v2019_01_01.EventSubscriptions get" })
+ @GET("{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}")
+ Observable> get(@Path(value = "scope", encoded = true) String scope, @Path("eventSubscriptionName") String eventSubscriptionName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventgrid.v2019_01_01.EventSubscriptions createOrUpdate" })
+ @PUT("{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}")
+ Observable> createOrUpdate(@Path(value = "scope", encoded = true) String scope, @Path("eventSubscriptionName") String eventSubscriptionName, @Body EventSubscriptionInner eventSubscriptionInfo, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventgrid.v2019_01_01.EventSubscriptions beginCreateOrUpdate" })
+ @PUT("{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}")
+ Observable> beginCreateOrUpdate(@Path(value = "scope", encoded = true) String scope, @Path("eventSubscriptionName") String eventSubscriptionName, @Body EventSubscriptionInner eventSubscriptionInfo, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventgrid.v2019_01_01.EventSubscriptions delete" })
+ @HTTP(path = "{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}", method = "DELETE", hasBody = true)
+ Observable> delete(@Path(value = "scope", encoded = true) String scope, @Path("eventSubscriptionName") String eventSubscriptionName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventgrid.v2019_01_01.EventSubscriptions beginDelete" })
+ @HTTP(path = "{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}", method = "DELETE", hasBody = true)
+ Observable> beginDelete(@Path(value = "scope", encoded = true) String scope, @Path("eventSubscriptionName") String eventSubscriptionName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventgrid.v2019_01_01.EventSubscriptions update" })
+ @PATCH("{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}")
+ Observable> update(@Path(value = "scope", encoded = true) String scope, @Path("eventSubscriptionName") String eventSubscriptionName, @Body EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventgrid.v2019_01_01.EventSubscriptions beginUpdate" })
+ @PATCH("{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}")
+ Observable> beginUpdate(@Path(value = "scope", encoded = true) String scope, @Path("eventSubscriptionName") String eventSubscriptionName, @Body EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventgrid.v2019_01_01.EventSubscriptions getFullUrl" })
+ @POST("{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}/getFullUrl")
+ Observable> getFullUrl(@Path(value = "scope", encoded = true) String scope, @Path("eventSubscriptionName") String eventSubscriptionName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventgrid.v2019_01_01.EventSubscriptions list" })
+ @GET("subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/eventSubscriptions")
+ Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventgrid.v2019_01_01.EventSubscriptions listGlobalBySubscriptionForTopicType" })
+ @GET("subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/topicTypes/{topicTypeName}/eventSubscriptions")
+ Observable> listGlobalBySubscriptionForTopicType(@Path("subscriptionId") String subscriptionId, @Path("topicTypeName") String topicTypeName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventgrid.v2019_01_01.EventSubscriptions listByResourceGroup" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/eventSubscriptions")
+ Observable> listByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventgrid.v2019_01_01.EventSubscriptions listGlobalByResourceGroupForTopicType" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topicTypes/{topicTypeName}/eventSubscriptions")
+ Observable> listGlobalByResourceGroupForTopicType(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("topicTypeName") String topicTypeName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventgrid.v2019_01_01.EventSubscriptions listRegionalBySubscription" })
+ @GET("subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/locations/{location}/eventSubscriptions")
+ Observable> listRegionalBySubscription(@Path("subscriptionId") String subscriptionId, @Path("location") String location, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventgrid.v2019_01_01.EventSubscriptions listRegionalByResourceGroup" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/locations/{location}/eventSubscriptions")
+ Observable> listRegionalByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("location") String location, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventgrid.v2019_01_01.EventSubscriptions listRegionalBySubscriptionForTopicType" })
+ @GET("subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/locations/{location}/topicTypes/{topicTypeName}/eventSubscriptions")
+ Observable> listRegionalBySubscriptionForTopicType(@Path("subscriptionId") String subscriptionId, @Path("location") String location, @Path("topicTypeName") String topicTypeName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventgrid.v2019_01_01.EventSubscriptions listRegionalByResourceGroupForTopicType" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/locations/{location}/topicTypes/{topicTypeName}/eventSubscriptions")
+ Observable> listRegionalByResourceGroupForTopicType(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("location") String location, @Path("topicTypeName") String topicTypeName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventgrid.v2019_01_01.EventSubscriptions listByResource" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{providerNamespace}/{resourceTypeName}/{resourceName}/providers/Microsoft.EventGrid/eventSubscriptions")
+ Observable> listByResource(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("providerNamespace") String providerNamespace, @Path("resourceTypeName") String resourceTypeName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ }
+
+ /**
+ * Get an event subscription.
+ * Get properties of an event subscription.
+ *
+ * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic.
+ * @param eventSubscriptionName Name of the event subscription
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the EventSubscriptionInner object if successful.
+ */
+ public EventSubscriptionInner get(String scope, String eventSubscriptionName) {
+ return getWithServiceResponseAsync(scope, eventSubscriptionName).toBlocking().single().body();
+ }
+
+ /**
+ * Get an event subscription.
+ * Get properties of an event subscription.
+ *
+ * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic.
+ * @param eventSubscriptionName Name of the event subscription
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture getAsync(String scope, String eventSubscriptionName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(getWithServiceResponseAsync(scope, eventSubscriptionName), serviceCallback);
+ }
+
+ /**
+ * Get an event subscription.
+ * Get properties of an event subscription.
+ *
+ * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic.
+ * @param eventSubscriptionName Name of the event subscription
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the EventSubscriptionInner object
+ */
+ public Observable getAsync(String scope, String eventSubscriptionName) {
+ return getWithServiceResponseAsync(scope, eventSubscriptionName).map(new Func1, EventSubscriptionInner>() {
+ @Override
+ public EventSubscriptionInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Get an event subscription.
+ * Get properties of an event subscription.
+ *
+ * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic.
+ * @param eventSubscriptionName Name of the event subscription
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the EventSubscriptionInner object
+ */
+ public Observable> getWithServiceResponseAsync(String scope, String eventSubscriptionName) {
+ if (scope == null) {
+ throw new IllegalArgumentException("Parameter scope is required and cannot be null.");
+ }
+ if (eventSubscriptionName == null) {
+ throw new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ return service.get(scope, eventSubscriptionName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = getDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+ /**
+ * Create or update an event subscription.
+ * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope.
+ *
+ * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic.
+ * @param eventSubscriptionName Name of the event subscription. Event subscription names must be between 3 and 64 characters in length and should use alphanumeric letters only.
+ * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the EventSubscriptionInner object if successful.
+ */
+ public EventSubscriptionInner createOrUpdate(String scope, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) {
+ return createOrUpdateWithServiceResponseAsync(scope, eventSubscriptionName, eventSubscriptionInfo).toBlocking().last().body();
+ }
+
+ /**
+ * Create or update an event subscription.
+ * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope.
+ *
+ * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic.
+ * @param eventSubscriptionName Name of the event subscription. Event subscription names must be between 3 and 64 characters in length and should use alphanumeric letters only.
+ * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture createOrUpdateAsync(String scope, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(scope, eventSubscriptionName, eventSubscriptionInfo), serviceCallback);
+ }
+
+ /**
+ * Create or update an event subscription.
+ * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope.
+ *
+ * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic.
+ * @param eventSubscriptionName Name of the event subscription. Event subscription names must be between 3 and 64 characters in length and should use alphanumeric letters only.
+ * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ public Observable createOrUpdateAsync(String scope, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) {
+ return createOrUpdateWithServiceResponseAsync(scope, eventSubscriptionName, eventSubscriptionInfo).map(new Func1, EventSubscriptionInner>() {
+ @Override
+ public EventSubscriptionInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Create or update an event subscription.
+ * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope.
+ *
+ * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic.
+ * @param eventSubscriptionName Name of the event subscription. Event subscription names must be between 3 and 64 characters in length and should use alphanumeric letters only.
+ * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ public Observable> createOrUpdateWithServiceResponseAsync(String scope, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) {
+ if (scope == null) {
+ throw new IllegalArgumentException("Parameter scope is required and cannot be null.");
+ }
+ if (eventSubscriptionName == null) {
+ throw new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.");
+ }
+ if (eventSubscriptionInfo == null) {
+ throw new IllegalArgumentException("Parameter eventSubscriptionInfo is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ Validator.validate(eventSubscriptionInfo);
+ Observable> observable = service.createOrUpdate(scope, eventSubscriptionName, eventSubscriptionInfo, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent());
+ return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType());
+ }
+
+ /**
+ * Create or update an event subscription.
+ * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope.
+ *
+ * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic.
+ * @param eventSubscriptionName Name of the event subscription. Event subscription names must be between 3 and 64 characters in length and should use alphanumeric letters only.
+ * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the EventSubscriptionInner object if successful.
+ */
+ public EventSubscriptionInner beginCreateOrUpdate(String scope, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) {
+ return beginCreateOrUpdateWithServiceResponseAsync(scope, eventSubscriptionName, eventSubscriptionInfo).toBlocking().single().body();
+ }
+
+ /**
+ * Create or update an event subscription.
+ * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope.
+ *
+ * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic.
+ * @param eventSubscriptionName Name of the event subscription. Event subscription names must be between 3 and 64 characters in length and should use alphanumeric letters only.
+ * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture beginCreateOrUpdateAsync(String scope, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(scope, eventSubscriptionName, eventSubscriptionInfo), serviceCallback);
+ }
+
+ /**
+ * Create or update an event subscription.
+ * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope.
+ *
+ * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic.
+ * @param eventSubscriptionName Name of the event subscription. Event subscription names must be between 3 and 64 characters in length and should use alphanumeric letters only.
+ * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the EventSubscriptionInner object
+ */
+ public Observable beginCreateOrUpdateAsync(String scope, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) {
+ return beginCreateOrUpdateWithServiceResponseAsync(scope, eventSubscriptionName, eventSubscriptionInfo).map(new Func1, EventSubscriptionInner>() {
+ @Override
+ public EventSubscriptionInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Create or update an event subscription.
+ * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope.
+ *
+ * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic.
+ * @param eventSubscriptionName Name of the event subscription. Event subscription names must be between 3 and 64 characters in length and should use alphanumeric letters only.
+ * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the EventSubscriptionInner object
+ */
+ public Observable> beginCreateOrUpdateWithServiceResponseAsync(String scope, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) {
+ if (scope == null) {
+ throw new IllegalArgumentException("Parameter scope is required and cannot be null.");
+ }
+ if (eventSubscriptionName == null) {
+ throw new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.");
+ }
+ if (eventSubscriptionInfo == null) {
+ throw new IllegalArgumentException("Parameter eventSubscriptionInfo is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ Validator.validate(eventSubscriptionInfo);
+ return service.beginCreateOrUpdate(scope, eventSubscriptionName, eventSubscriptionInfo, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(201, new TypeToken() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+ /**
+ * Delete an event subscription.
+ * Delete an existing event subscription.
+ *
+ * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic.
+ * @param eventSubscriptionName Name of the event subscription
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ */
+ public void delete(String scope, String eventSubscriptionName) {
+ deleteWithServiceResponseAsync(scope, eventSubscriptionName).toBlocking().last().body();
+ }
+
+ /**
+ * Delete an event subscription.
+ * Delete an existing event subscription.
+ *
+ * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic.
+ * @param eventSubscriptionName Name of the event subscription
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture deleteAsync(String scope, String eventSubscriptionName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(scope, eventSubscriptionName), serviceCallback);
+ }
+
+ /**
+ * Delete an event subscription.
+ * Delete an existing event subscription.
+ *
+ * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic.
+ * @param eventSubscriptionName Name of the event subscription
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ public Observable deleteAsync(String scope, String eventSubscriptionName) {
+ return deleteWithServiceResponseAsync(scope, eventSubscriptionName).map(new Func1, Void>() {
+ @Override
+ public Void call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Delete an event subscription.
+ * Delete an existing event subscription.
+ *
+ * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic.
+ * @param eventSubscriptionName Name of the event subscription
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ public Observable> deleteWithServiceResponseAsync(String scope, String eventSubscriptionName) {
+ if (scope == null) {
+ throw new IllegalArgumentException("Parameter scope is required and cannot be null.");
+ }
+ if (eventSubscriptionName == null) {
+ throw new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ Observable> observable = service.delete(scope, eventSubscriptionName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent());
+ return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType());
+ }
+
+ /**
+ * Delete an event subscription.
+ * Delete an existing event subscription.
+ *
+ * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic.
+ * @param eventSubscriptionName Name of the event subscription
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ */
+ public void beginDelete(String scope, String eventSubscriptionName) {
+ beginDeleteWithServiceResponseAsync(scope, eventSubscriptionName).toBlocking().single().body();
+ }
+
+ /**
+ * Delete an event subscription.
+ * Delete an existing event subscription.
+ *
+ * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic.
+ * @param eventSubscriptionName Name of the event subscription
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture beginDeleteAsync(String scope, String eventSubscriptionName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(scope, eventSubscriptionName), serviceCallback);
+ }
+
+ /**
+ * Delete an event subscription.
+ * Delete an existing event subscription.
+ *
+ * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic.
+ * @param eventSubscriptionName Name of the event subscription
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceResponse} object if successful.
+ */
+ public Observable beginDeleteAsync(String scope, String eventSubscriptionName) {
+ return beginDeleteWithServiceResponseAsync(scope, eventSubscriptionName).map(new Func1, Void>() {
+ @Override
+ public Void call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Delete an event subscription.
+ * Delete an existing event subscription.
+ *
+ * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic.
+ * @param eventSubscriptionName Name of the event subscription
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceResponse} object if successful.
+ */
+ public Observable> beginDeleteWithServiceResponseAsync(String scope, String eventSubscriptionName) {
+ if (scope == null) {
+ throw new IllegalArgumentException("Parameter scope is required and cannot be null.");
+ }
+ if (eventSubscriptionName == null) {
+ throw new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ return service.beginDelete(scope, eventSubscriptionName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = beginDeleteDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .register(202, new TypeToken() { }.getType())
+ .register(204, new TypeToken() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+ /**
+ * Update an event subscription.
+ * Asynchronously updates an existing event subscription.
+ *
+ * @param scope The scope of existing event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic.
+ * @param eventSubscriptionName Name of the event subscription to be updated
+ * @param eventSubscriptionUpdateParameters Updated event subscription information
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the EventSubscriptionInner object if successful.
+ */
+ public EventSubscriptionInner update(String scope, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) {
+ return updateWithServiceResponseAsync(scope, eventSubscriptionName, eventSubscriptionUpdateParameters).toBlocking().last().body();
+ }
+
+ /**
+ * Update an event subscription.
+ * Asynchronously updates an existing event subscription.
+ *
+ * @param scope The scope of existing event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic.
+ * @param eventSubscriptionName Name of the event subscription to be updated
+ * @param eventSubscriptionUpdateParameters Updated event subscription information
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture updateAsync(String scope, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(updateWithServiceResponseAsync(scope, eventSubscriptionName, eventSubscriptionUpdateParameters), serviceCallback);
+ }
+
+ /**
+ * Update an event subscription.
+ * Asynchronously updates an existing event subscription.
+ *
+ * @param scope The scope of existing event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic.
+ * @param eventSubscriptionName Name of the event subscription to be updated
+ * @param eventSubscriptionUpdateParameters Updated event subscription information
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ public Observable updateAsync(String scope, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) {
+ return updateWithServiceResponseAsync(scope, eventSubscriptionName, eventSubscriptionUpdateParameters).map(new Func1, EventSubscriptionInner>() {
+ @Override
+ public EventSubscriptionInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Update an event subscription.
+ * Asynchronously updates an existing event subscription.
+ *
+ * @param scope The scope of existing event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic.
+ * @param eventSubscriptionName Name of the event subscription to be updated
+ * @param eventSubscriptionUpdateParameters Updated event subscription information
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ public Observable> updateWithServiceResponseAsync(String scope, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) {
+ if (scope == null) {
+ throw new IllegalArgumentException("Parameter scope is required and cannot be null.");
+ }
+ if (eventSubscriptionName == null) {
+ throw new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.");
+ }
+ if (eventSubscriptionUpdateParameters == null) {
+ throw new IllegalArgumentException("Parameter eventSubscriptionUpdateParameters is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ Validator.validate(eventSubscriptionUpdateParameters);
+ Observable> observable = service.update(scope, eventSubscriptionName, eventSubscriptionUpdateParameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent());
+ return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType());
+ }
+
+ /**
+ * Update an event subscription.
+ * Asynchronously updates an existing event subscription.
+ *
+ * @param scope The scope of existing event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic.
+ * @param eventSubscriptionName Name of the event subscription to be updated
+ * @param eventSubscriptionUpdateParameters Updated event subscription information
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the EventSubscriptionInner object if successful.
+ */
+ public EventSubscriptionInner beginUpdate(String scope, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) {
+ return beginUpdateWithServiceResponseAsync(scope, eventSubscriptionName, eventSubscriptionUpdateParameters).toBlocking().single().body();
+ }
+
+ /**
+ * Update an event subscription.
+ * Asynchronously updates an existing event subscription.
+ *
+ * @param scope The scope of existing event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic.
+ * @param eventSubscriptionName Name of the event subscription to be updated
+ * @param eventSubscriptionUpdateParameters Updated event subscription information
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture beginUpdateAsync(String scope, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(scope, eventSubscriptionName, eventSubscriptionUpdateParameters), serviceCallback);
+ }
+
+ /**
+ * Update an event subscription.
+ * Asynchronously updates an existing event subscription.
+ *
+ * @param scope The scope of existing event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic.
+ * @param eventSubscriptionName Name of the event subscription to be updated
+ * @param eventSubscriptionUpdateParameters Updated event subscription information
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the EventSubscriptionInner object
+ */
+ public Observable beginUpdateAsync(String scope, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) {
+ return beginUpdateWithServiceResponseAsync(scope, eventSubscriptionName, eventSubscriptionUpdateParameters).map(new Func1, EventSubscriptionInner>() {
+ @Override
+ public EventSubscriptionInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Update an event subscription.
+ * Asynchronously updates an existing event subscription.
+ *
+ * @param scope The scope of existing event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic.
+ * @param eventSubscriptionName Name of the event subscription to be updated
+ * @param eventSubscriptionUpdateParameters Updated event subscription information
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the EventSubscriptionInner object
+ */
+ public Observable> beginUpdateWithServiceResponseAsync(String scope, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) {
+ if (scope == null) {
+ throw new IllegalArgumentException("Parameter scope is required and cannot be null.");
+ }
+ if (eventSubscriptionName == null) {
+ throw new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.");
+ }
+ if (eventSubscriptionUpdateParameters == null) {
+ throw new IllegalArgumentException("Parameter eventSubscriptionUpdateParameters is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ Validator.validate(eventSubscriptionUpdateParameters);
+ return service.beginUpdate(scope, eventSubscriptionName, eventSubscriptionUpdateParameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse