Skip to content

Commit

Permalink
CodeGen from PR 11631 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
fix example (#11631)

Co-authored-by: Ashraf Hamad <ahamad@ntdev.microsoft.com>
  • Loading branch information
SDKAuto and Ashraf Hamad committed Nov 12, 2020
1 parent a097f96 commit 764b86b
Show file tree
Hide file tree
Showing 23 changed files with 32 additions and 26 deletions.
6 changes: 4 additions & 2 deletions sdk/eventgrid/mgmt-v2019_06_01/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<parent>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-arm-parent</artifactId>
<version>1.2.0</version>
<relativePath>../../parents/azure-arm-parent</relativePath>
<version>1.1.0</version>
<relativePath>../../../pom.management.xml</relativePath>
</parent>
<artifactId>azure-mgmt-eventgrid</artifactId>
<version>1.0.0-beta</version>
Expand Down Expand Up @@ -71,6 +71,8 @@
<artifactId>azure-arm-client-runtime</artifactId>
<type>test-jar</type>
<scope>test</scope>
<!--Below version for test jar needs to be removed, this will be done as part of v1-runtime 1.6.7-->
<version>1.6.5</version>
</dependency>
</dependencies>
<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* BoolEqualsAdvancedFilter, NumberInAdvancedFilter, StringEqualsAdvancedFilter
* etc. depending on the type of the key based on which you want to filter.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType", defaultImpl = AdvancedFilter.class)
@JsonTypeName("AdvancedFilter")
@JsonSubTypes({
@JsonSubTypes.Type(name = "NumberIn", value = NumberInAdvancedFilter.class),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/**
* BoolEquals Advanced Filter.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType", defaultImpl = BoolEqualsAdvancedFilter.class)
@JsonTypeName("BoolEquals")
public class BoolEqualsAdvancedFilter extends AdvancedFilter {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* StorageBlobDeadLetterDestination is the only class that derives from this
* class.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType", defaultImpl = DeadLetterDestination.class)
@JsonTypeName("DeadLetterDestination")
@JsonSubTypes({
@JsonSubTypes.Type(name = "StorageBlob", value = StorageBlobDeadLetterDestination.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/**
* Information about the event hub destination for an event subscription.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType", defaultImpl = EventHubEventSubscriptionDestination.class)
@JsonTypeName("EventHub")
@JsonFlatten
public class EventHubEventSubscriptionDestination extends EventSubscriptionDestination {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/**
* Information about the destination for an event subscription.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType", defaultImpl = EventSubscriptionDestination.class)
@JsonTypeName("EventSubscriptionDestination")
@JsonSubTypes({
@JsonSubTypes.Type(name = "WebHook", value = WebHookEventSubscriptionDestination.class),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* Information about the HybridConnection destination for an event
* subscription.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType", defaultImpl = HybridConnectionEventSubscriptionDestination.class)
@JsonTypeName("HybridConnection")
@JsonFlatten
public class HybridConnectionEventSubscriptionDestination extends EventSubscriptionDestination {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/**
* NumberGreaterThan Advanced Filter.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType", defaultImpl = NumberGreaterThanAdvancedFilter.class)
@JsonTypeName("NumberGreaterThan")
public class NumberGreaterThanAdvancedFilter extends AdvancedFilter {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/**
* NumberGreaterThanOrEquals Advanced Filter.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType", defaultImpl = NumberGreaterThanOrEqualsAdvancedFilter.class)
@JsonTypeName("NumberGreaterThanOrEquals")
public class NumberGreaterThanOrEqualsAdvancedFilter extends AdvancedFilter {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/**
* NumberIn Advanced Filter.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType", defaultImpl = NumberInAdvancedFilter.class)
@JsonTypeName("NumberIn")
public class NumberInAdvancedFilter extends AdvancedFilter {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/**
* NumberLessThan Advanced Filter.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType", defaultImpl = NumberLessThanAdvancedFilter.class)
@JsonTypeName("NumberLessThan")
public class NumberLessThanAdvancedFilter extends AdvancedFilter {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/**
* NumberLessThanOrEquals Advanced Filter.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType", defaultImpl = NumberLessThanOrEqualsAdvancedFilter.class)
@JsonTypeName("NumberLessThanOrEquals")
public class NumberLessThanOrEqualsAdvancedFilter extends AdvancedFilter {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/**
* NumberNotIn Advanced Filter.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType", defaultImpl = NumberNotInAdvancedFilter.class)
@JsonTypeName("NumberNotIn")
public class NumberNotInAdvancedFilter extends AdvancedFilter {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/**
* Information about the service bus destination for an event subscription.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType", defaultImpl = ServiceBusQueueEventSubscriptionDestination.class)
@JsonTypeName("ServiceBusQueue")
@JsonFlatten
public class ServiceBusQueueEventSubscriptionDestination extends EventSubscriptionDestination {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/**
* Information about the storage blob based dead letter destination.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType", defaultImpl = StorageBlobDeadLetterDestination.class)
@JsonTypeName("StorageBlob")
@JsonFlatten
public class StorageBlobDeadLetterDestination extends DeadLetterDestination {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/**
* Information about the storage queue destination for an event subscription.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType", defaultImpl = StorageQueueEventSubscriptionDestination.class)
@JsonTypeName("StorageQueue")
@JsonFlatten
public class StorageQueueEventSubscriptionDestination extends EventSubscriptionDestination {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/**
* StringBeginsWith Advanced Filter.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType", defaultImpl = StringBeginsWithAdvancedFilter.class)
@JsonTypeName("StringBeginsWith")
public class StringBeginsWithAdvancedFilter extends AdvancedFilter {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/**
* StringContains Advanced Filter.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType", defaultImpl = StringContainsAdvancedFilter.class)
@JsonTypeName("StringContains")
public class StringContainsAdvancedFilter extends AdvancedFilter {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/**
* StringEndsWith Advanced Filter.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType", defaultImpl = StringEndsWithAdvancedFilter.class)
@JsonTypeName("StringEndsWith")
public class StringEndsWithAdvancedFilter extends AdvancedFilter {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/**
* StringIn Advanced Filter.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType", defaultImpl = StringInAdvancedFilter.class)
@JsonTypeName("StringIn")
public class StringInAdvancedFilter extends AdvancedFilter {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/**
* StringNotIn Advanced Filter.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType", defaultImpl = StringNotInAdvancedFilter.class)
@JsonTypeName("StringNotIn")
public class StringNotInAdvancedFilter extends AdvancedFilter {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/**
* Information about the webhook destination for an event subscription.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType", defaultImpl = WebHookEventSubscriptionDestination.class)
@JsonTypeName("WebHook")
@JsonFlatten
public class WebHookEventSubscriptionDestination extends EventSubscriptionDestination {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,14 @@ public DomainTopic call(DomainTopicInner inner) {
public Observable<DomainTopic> getAsync(String resourceGroupName, String domainName, String domainTopicName) {
DomainTopicsInner client = this.inner();
return client.getAsync(resourceGroupName, domainName, domainTopicName)
.map(new Func1<DomainTopicInner, DomainTopic>() {
.flatMap(new Func1<DomainTopicInner, Observable<DomainTopic>>() {
@Override
public DomainTopic call(DomainTopicInner inner) {
return wrapModel(inner);
public Observable<DomainTopic> call(DomainTopicInner inner) {
if (inner == null) {
return Observable.empty();
} else {
return Observable.just((DomainTopic)wrapModel(inner));
}
}
});
}
Expand Down

0 comments on commit 764b86b

Please sign in to comment.