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

[AutoPR eventhub/resource-manager] EventHub : corrected typo #3082

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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
import rx.Observable;
import com.microsoft.azure.arm.resources.collection.SupportsListingByResourceGroup;
import com.microsoft.azure.arm.collection.SupportsListing;
import com.microsoft.azure.management.eventhub.v2017_04_01.implementation.NetworkRuleSetInner;
import com.microsoft.azure.management.eventhub.v2017_04_01.implementation.NamespacesInner;
import com.microsoft.azure.arm.model.HasInner;
import com.microsoft.azure.management.eventhub.v2017_04_01.NamespaceAuthorizationRule;
import rx.Completable;
import com.microsoft.azure.management.eventhub.v2017_04_01.implementation.NetworkRuleSetInner;

/**
* Type representing Namespaces.
Expand All @@ -42,6 +42,27 @@ public interface Namespaces extends SupportsCreating<EHNamespace.DefinitionStage
*/
Observable<MessagingPlan> getMessagingPlanAsync(String resourceGroupName, String namespaceName);

/**
* Create or update NetworkRuleSet for a Namespace.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
* @param parameters The Namespace IpFilterRule.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
Observable<NetworkRuleSet> createOrUpdateNetworkRuleSetAsync(String resourceGroupName, String namespaceName, NetworkRuleSetInner parameters);

/**
* Gets 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> getNetworkRuleSetAsync(String resourceGroupName, String namespaceName);

/**
* Check the give Namespace name availability.
*
Expand Down Expand Up @@ -106,25 +127,4 @@ public interface Namespaces extends SupportsCreating<EHNamespace.DefinitionStage
*/
Observable<AccessKeys> regenerateKeysAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, RegenerateAccessKeyParameters parameters);

/**
* Create or update NetworkRuleSet for a Namespace.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
* @param parameters The Namespace IpFilterRule.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
Observable<NetworkRuleSet> createOrUpdateNetworkRuleSetAsync(String resourceGroupName, String namespaceName, NetworkRuleSetInner parameters);

/**
* Gets 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> getNetworkRuleSetAsync(String resourceGroupName, String namespaceName);

}
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
import com.microsoft.azure.PagedList;
import com.microsoft.azure.Page;
import com.microsoft.azure.management.eventhub.v2017_04_01.MessagingPlan;
import com.microsoft.azure.management.eventhub.v2017_04_01.NetworkRuleSet;
import com.microsoft.azure.management.eventhub.v2017_04_01.CheckNameAvailabilityResult;
import com.microsoft.azure.management.eventhub.v2017_04_01.NamespaceAuthorizationRule;
import com.microsoft.azure.management.eventhub.v2017_04_01.AccessKeys;
import com.microsoft.azure.management.eventhub.v2017_04_01.RegenerateAccessKeyParameters;
import com.microsoft.azure.management.eventhub.v2017_04_01.NetworkRuleSet;

class NamespacesImpl extends GroupableResourcesCoreImpl<EHNamespace, EHNamespaceImpl, EHNamespaceInner, NamespacesInner, EventHubManager> implements Namespaces {
protected NamespacesImpl(EventHubManager manager) {
Expand Down Expand Up @@ -143,6 +143,30 @@ public MessagingPlan call(MessagingPlanInner inner) {
});
}

@Override
public Observable<NetworkRuleSet> createOrUpdateNetworkRuleSetAsync(String resourceGroupName, String namespaceName, NetworkRuleSetInner parameters) {
NamespacesInner client = this.inner();
return client.createOrUpdateNetworkRuleSetAsync(resourceGroupName, namespaceName, parameters)
.map(new Func1<NetworkRuleSetInner, NetworkRuleSet>() {
@Override
public NetworkRuleSet call(NetworkRuleSetInner inner) {
return new NetworkRuleSetImpl(inner, manager());
}
});
}

@Override
public Observable<NetworkRuleSet> getNetworkRuleSetAsync(String resourceGroupName, String namespaceName) {
NamespacesInner client = this.inner();
return client.getNetworkRuleSetAsync(resourceGroupName, namespaceName)
.map(new Func1<NetworkRuleSetInner, NetworkRuleSet>() {
@Override
public NetworkRuleSet call(NetworkRuleSetInner inner) {
return new NetworkRuleSetImpl(inner, manager());
}
});
}

@Override
public Observable<CheckNameAvailabilityResult> checkNameAvailabilityAsync(String name) {
NamespacesInner client = this.inner();
Expand Down Expand Up @@ -246,28 +270,4 @@ public AccessKeys call(AccessKeysInner inner) {
});
}

@Override
public Observable<NetworkRuleSet> createOrUpdateNetworkRuleSetAsync(String resourceGroupName, String namespaceName, NetworkRuleSetInner parameters) {
NamespacesInner client = this.inner();
return client.createOrUpdateNetworkRuleSetAsync(resourceGroupName, namespaceName, parameters)
.map(new Func1<NetworkRuleSetInner, NetworkRuleSet>() {
@Override
public NetworkRuleSet call(NetworkRuleSetInner inner) {
return new NetworkRuleSetImpl(inner, manager());
}
});
}

@Override
public Observable<NetworkRuleSet> getNetworkRuleSetAsync(String resourceGroupName, String namespaceName) {
NamespacesInner client = this.inner();
return client.getNetworkRuleSetAsync(resourceGroupName, namespaceName)
.map(new Func1<NetworkRuleSetInner, NetworkRuleSet>() {
@Override
public NetworkRuleSet call(NetworkRuleSetInner inner) {
return new NetworkRuleSetImpl(inner, manager());
}
});
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,11 @@ interface NamespacesService {
Observable<Response<ResponseBody>> regenerateKeys(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Body RegenerateAccessKeyParameters parameters, @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.eventhub.v2017_04_01.Namespaces createOrUpdateNetworkRuleSet" })
@PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSets/default")
@PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSet/default")
Observable<Response<ResponseBody>> createOrUpdateNetworkRuleSet(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Body NetworkRuleSetInner parameters, @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.eventhub.v2017_04_01.Namespaces getNetworkRuleSet" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSets/default")
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSet/default")
Observable<Response<ResponseBody>> getNetworkRuleSet(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @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.eventhub.v2017_04_01.Namespaces listNext" })
Expand Down