Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[ReleasePR sdk/eventhubs/mgmt-v2017_04_01] Update EventHub.json #7266

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion sdk/eventhubs/mgmt-v2017_04_01/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-arm-parent</artifactId>
<version>1.2.0</version>
<version>1.1.0</version>
<relativePath>../../../pom.management.xml</relativePath>
</parent>
<artifactId>azure-mgmt-eventhubs</artifactId>
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 @@ -19,6 +19,7 @@
import com.microsoft.azure.arm.model.HasInner;
import com.microsoft.azure.management.eventhubs.v2017_04_01.NamespaceAuthorizationRule;
import rx.Completable;
import com.microsoft.azure.management.eventhubs.v2017_04_01.NetworkRuleSet;
import com.microsoft.azure.management.eventhubs.v2017_04_01.implementation.NetworkRuleSetInner;

/**
Expand Down Expand Up @@ -106,6 +107,16 @@ public interface Namespaces extends SupportsCreating<EHNamespace.DefinitionStage
*/
Observable<AccessKeys> regenerateKeysAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, RegenerateAccessKeyParameters parameters);

/**
* Gets list of NetworkRuleSet for a Namespace.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
Observable<NetworkRuleSet> listNetworkRuleSetsAsync(final String resourceGroupName, final String namespaceName);

/**
* Create or update NetworkRuleSet for a Namespace.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
package com.microsoft.azure.management.eventhubs.v2017_04_01;

import com.microsoft.azure.arm.model.HasInner;
import com.microsoft.azure.management.eventhubs.v2017_04_01.implementation.NetworkRuleSetInner;
import com.microsoft.azure.arm.resources.models.HasManager;
import com.microsoft.azure.management.eventhubs.v2017_04_01.implementation.EventHubsManager;
import com.microsoft.azure.management.eventhubs.v2017_04_01.implementation.NetworkRuleSetInner;
import java.util.List;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,14 @@ public ConsumerGroup call(ConsumerGroupInner inner) {
public Observable<ConsumerGroup> getAsync(String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName) {
ConsumerGroupsInner client = this.inner();
return client.getAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName)
.map(new Func1<ConsumerGroupInner, ConsumerGroup>() {
.flatMap(new Func1<ConsumerGroupInner, Observable<ConsumerGroup>>() {
@Override
public ConsumerGroup call(ConsumerGroupInner inner) {
return wrapModel(inner);
public Observable<ConsumerGroup> call(ConsumerGroupInner inner) {
if (inner == null) {
return Observable.empty();
} else {
return Observable.just((ConsumerGroup)wrapModel(inner));
}
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,14 @@ public ArmDisasterRecovery call(ArmDisasterRecoveryInner inner) {
public Observable<ArmDisasterRecovery> getAsync(String resourceGroupName, String namespaceName, String alias) {
DisasterRecoveryConfigsInner client = this.inner();
return client.getAsync(resourceGroupName, namespaceName, alias)
.map(new Func1<ArmDisasterRecoveryInner, ArmDisasterRecovery>() {
.flatMap(new Func1<ArmDisasterRecoveryInner, Observable<ArmDisasterRecovery>>() {
@Override
public ArmDisasterRecovery call(ArmDisasterRecoveryInner inner) {
return wrapModel(inner);
public Observable<ArmDisasterRecovery> call(ArmDisasterRecoveryInner inner) {
if (inner == null) {
return Observable.empty();
} else {
return Observable.just((ArmDisasterRecovery)wrapModel(inner));
}
}
});
}
Expand Down Expand Up @@ -122,10 +126,14 @@ private Observable<AuthorizationRuleInner> getAuthorizationRuleInnerUsingDisaste
public Observable<DisasterRecoveryConfigNamespaceAuthorizationRule> getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String alias, String authorizationRuleName) {
DisasterRecoveryConfigsInner client = this.inner();
return client.getAuthorizationRuleAsync(resourceGroupName, namespaceName, alias, authorizationRuleName)
.map(new Func1<AuthorizationRuleInner, DisasterRecoveryConfigNamespaceAuthorizationRule>() {
.flatMap(new Func1<AuthorizationRuleInner, Observable<DisasterRecoveryConfigNamespaceAuthorizationRule>>() {
@Override
public DisasterRecoveryConfigNamespaceAuthorizationRule call(AuthorizationRuleInner inner) {
return wrapDisasterRecoveryConfigNamespaceAuthorizationRuleModel(inner);
public Observable<DisasterRecoveryConfigNamespaceAuthorizationRule> call(AuthorizationRuleInner inner) {
if (inner == null) {
return Observable.empty();
} else {
return Observable.just((DisasterRecoveryConfigNamespaceAuthorizationRule)wrapDisasterRecoveryConfigNamespaceAuthorizationRuleModel(inner));
}
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,14 @@ public Eventhub call(EventhubInner inner) {
public Observable<Eventhub> getAsync(String resourceGroupName, String namespaceName, String eventHubName) {
EventHubsInner client = this.inner();
return client.getAsync(resourceGroupName, namespaceName, eventHubName)
.map(new Func1<EventhubInner, Eventhub>() {
.flatMap(new Func1<EventhubInner, Observable<Eventhub>>() {
@Override
public Eventhub call(EventhubInner inner) {
return wrapModel(inner);
public Observable<Eventhub> call(EventhubInner inner) {
if (inner == null) {
return Observable.empty();
} else {
return Observable.just((Eventhub)wrapModel(inner));
}
}
});
}
Expand Down Expand Up @@ -107,10 +111,14 @@ private Observable<AuthorizationRuleInner> getAuthorizationRuleInnerUsingEventHu
public Observable<EventhubNamespaceAuthorizationRule> getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName) {
EventHubsInner client = this.inner();
return client.getAuthorizationRuleAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName)
.map(new Func1<AuthorizationRuleInner, EventhubNamespaceAuthorizationRule>() {
.flatMap(new Func1<AuthorizationRuleInner, Observable<EventhubNamespaceAuthorizationRule>>() {
@Override
public EventhubNamespaceAuthorizationRule call(AuthorizationRuleInner inner) {
return wrapEventhubNamespaceAuthorizationRuleModel(inner);
public Observable<EventhubNamespaceAuthorizationRule> call(AuthorizationRuleInner inner) {
if (inner == null) {
return Observable.empty();
} else {
return Observable.just((EventhubNamespaceAuthorizationRule)wrapEventhubNamespaceAuthorizationRuleModel(inner));
}
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,7 @@ private ServiceResponse<PageImpl<AuthorizationRuleInner>> listAuthorizationRules
}

/**
* Creates or updates an AuthorizationRule for the specified Event Hub.
* Creates or updates an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule will take a few seconds to take effect.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
Expand All @@ -801,7 +801,7 @@ public AuthorizationRuleInner createOrUpdateAuthorizationRule(String resourceGro
}

/**
* Creates or updates an AuthorizationRule for the specified Event Hub.
* Creates or updates an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule will take a few seconds to take effect.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
Expand All @@ -817,7 +817,7 @@ public ServiceFuture<AuthorizationRuleInner> createOrUpdateAuthorizationRuleAsyn
}

/**
* Creates or updates an AuthorizationRule for the specified Event Hub.
* Creates or updates an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule will take a few seconds to take effect.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
Expand All @@ -837,7 +837,7 @@ public AuthorizationRuleInner call(ServiceResponse<AuthorizationRuleInner> respo
}

/**
* Creates or updates an AuthorizationRule for the specified Event Hub.
* Creates or updates an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule will take a few seconds to take effect.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,10 @@ private NamespaceAuthorizationRuleImpl wrapNamespaceAuthorizationRuleModel(Autho
return new NamespaceAuthorizationRuleImpl(inner, manager());
}

private NetworkRuleSetImpl wrapNetworkRuleSetModel(NetworkRuleSetInner inner) {
return new NetworkRuleSetImpl(inner, manager());
}

private Observable<AuthorizationRuleInner> getAuthorizationRuleInnerUsingNamespacesInnerAsync(String id) {
String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups");
String namespaceName = IdParsingUtils.getValueFromIdByName(id, "namespaces");
Expand All @@ -190,10 +194,14 @@ private Observable<AuthorizationRuleInner> getAuthorizationRuleInnerUsingNamespa
public Observable<NamespaceAuthorizationRule> getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName) {
NamespacesInner client = this.inner();
return client.getAuthorizationRuleAsync(resourceGroupName, namespaceName, authorizationRuleName)
.map(new Func1<AuthorizationRuleInner, NamespaceAuthorizationRule>() {
.flatMap(new Func1<AuthorizationRuleInner, Observable<NamespaceAuthorizationRule>>() {
@Override
public NamespaceAuthorizationRule call(AuthorizationRuleInner inner) {
return wrapNamespaceAuthorizationRuleModel(inner);
public Observable<NamespaceAuthorizationRule> call(AuthorizationRuleInner inner) {
if (inner == null) {
return Observable.empty();
} else {
return Observable.just((NamespaceAuthorizationRule)wrapNamespaceAuthorizationRuleModel(inner));
}
}
});
}
Expand Down Expand Up @@ -246,6 +254,24 @@ public AccessKeys call(AccessKeysInner inner) {
});
}

@Override
public Observable<NetworkRuleSet> listNetworkRuleSetsAsync(final String resourceGroupName, final String namespaceName) {
NamespacesInner client = this.inner();
return client.listNetworkRuleSetsAsync(resourceGroupName, namespaceName)
.flatMapIterable(new Func1<Page<NetworkRuleSetInner>, Iterable<NetworkRuleSetInner>>() {
@Override
public Iterable<NetworkRuleSetInner> call(Page<NetworkRuleSetInner> page) {
return page.items();
}
})
.map(new Func1<NetworkRuleSetInner, NetworkRuleSet>() {
@Override
public NetworkRuleSet call(NetworkRuleSetInner inner) {
return wrapNetworkRuleSetModel(inner);
}
});
}

@Override
public Observable<NetworkRuleSet> createOrUpdateNetworkRuleSetAsync(String resourceGroupName, String namespaceName, NetworkRuleSetInner parameters) {
NamespacesInner client = this.inner();
Expand Down
Loading