Skip to content
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
6 changes: 4 additions & 2 deletions sdk/servicebus/mgmt-v2017_04_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-servicebus</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 @@ -19,6 +19,7 @@
import com.microsoft.azure.management.servicebus.v2017_04_01.implementation.NamespacesInner;
import com.microsoft.azure.arm.model.HasInner;
import com.microsoft.azure.management.servicebus.v2017_04_01.NamespaceSBAuthorizationRule;
import com.microsoft.azure.management.servicebus.v2017_04_01.NetworkRuleSet;
import com.microsoft.azure.management.servicebus.v2017_04_01.implementation.NetworkRuleSetInner;

/**
Expand Down Expand Up @@ -107,6 +108,16 @@ public interface Namespaces extends SupportsCreating<SBNamespace.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.servicebus.v2017_04_01;

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

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,64 @@

package com.microsoft.azure.management.servicebus.v2017_04_01;

import com.microsoft.azure.Resource;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.microsoft.azure.ProxyResource;

/**
* The Resource definition.
*/
public class ResourceNamespacePatch extends Resource {
public class ResourceNamespacePatch extends ProxyResource {
/**
* Resource location.
*/
@JsonProperty(value = "location")
private String location;

/**
* Resource tags.
*/
@JsonProperty(value = "tags")
private Map<String, String> tags;

/**
* Get resource location.
*
* @return the location value
*/
public String location() {
return this.location;
}

/**
* Set resource location.
*
* @param location the location value to set
* @return the ResourceNamespacePatch object itself.
*/
public ResourceNamespacePatch withLocation(String location) {
this.location = location;
return this;
}

/**
* Get resource tags.
*
* @return the tags value
*/
public Map<String, String> tags() {
return this.tags;
}

/**
* Set resource tags.
*
* @param tags the tags value to set
* @return the ResourceNamespacePatch object itself.
*/
public ResourceNamespacePatch withTags(Map<String, String> tags) {
this.tags = tags;
return this;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class SqlFilter {
* This property is reserved for future use. An integer value showing the
* compatibility level, currently hard-coded to 20.
*/
@JsonProperty(value = "compatibilityLevel", access = JsonProperty.Access.WRITE_ONLY)
@JsonProperty(value = "compatibilityLevel")
private Integer compatibilityLevel;

/**
Expand Down Expand Up @@ -63,6 +63,17 @@ public Integer compatibilityLevel() {
return this.compatibilityLevel;
}

/**
* Set this property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20.
*
* @param compatibilityLevel the compatibilityLevel value to set
* @return the SqlFilter object itself.
*/
public SqlFilter withCompatibilityLevel(Integer compatibilityLevel) {
this.compatibilityLevel = compatibilityLevel;
return this;
}

/**
* Get value that indicates whether the rule action requires preprocessing.
*
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<SBAuthorizationRuleInner> getSBAuthorizationRuleInnerUsingDis
public Observable<DisasterRecoveryConfigNamespaceSBAuthorizationRule> getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String alias, String authorizationRuleName) {
DisasterRecoveryConfigsInner client = this.inner();
return client.getAuthorizationRuleAsync(resourceGroupName, namespaceName, alias, authorizationRuleName)
.map(new Func1<SBAuthorizationRuleInner, DisasterRecoveryConfigNamespaceSBAuthorizationRule>() {
.flatMap(new Func1<SBAuthorizationRuleInner, Observable<DisasterRecoveryConfigNamespaceSBAuthorizationRule>>() {
@Override
public DisasterRecoveryConfigNamespaceSBAuthorizationRule call(SBAuthorizationRuleInner inner) {
return wrapDisasterRecoveryConfigNamespaceSBAuthorizationRuleModel(inner);
public Observable<DisasterRecoveryConfigNamespaceSBAuthorizationRule> call(SBAuthorizationRuleInner inner) {
if (inner == null) {
return Observable.empty();
} else {
return Observable.just((DisasterRecoveryConfigNamespaceSBAuthorizationRule)wrapDisasterRecoveryConfigNamespaceSBAuthorizationRuleModel(inner));
}
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,14 @@ public MigrationConfigProperties call(MigrationConfigPropertiesInner inner) {
public Observable<MigrationConfigProperties> getAsync(String resourceGroupName, String namespaceName) {
MigrationConfigsInner client = this.inner();
return client.getAsync(resourceGroupName, namespaceName)
.map(new Func1<MigrationConfigPropertiesInner, MigrationConfigProperties>() {
.flatMap(new Func1<MigrationConfigPropertiesInner, Observable<MigrationConfigProperties>>() {
@Override
public MigrationConfigProperties call(MigrationConfigPropertiesInner inner) {
return wrapModel(inner);
public Observable<MigrationConfigProperties> call(MigrationConfigPropertiesInner inner) {
if (inner == null) {
return Observable.empty();
} else {
return Observable.just((MigrationConfigProperties)wrapModel(inner));
}
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ private NamespaceSBAuthorizationRuleImpl wrapNamespaceSBAuthorizationRuleModel(S
return new NamespaceSBAuthorizationRuleImpl(inner, manager());
}

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

private Observable<SBAuthorizationRuleInner> getSBAuthorizationRuleInnerUsingNamespacesInnerAsync(String id) {
String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups");
String namespaceName = IdParsingUtils.getValueFromIdByName(id, "namespaces");
Expand All @@ -184,10 +188,14 @@ private Observable<SBAuthorizationRuleInner> getSBAuthorizationRuleInnerUsingNam
public Observable<NamespaceSBAuthorizationRule> getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName) {
NamespacesInner client = this.inner();
return client.getAuthorizationRuleAsync(resourceGroupName, namespaceName, authorizationRuleName)
.map(new Func1<SBAuthorizationRuleInner, NamespaceSBAuthorizationRule>() {
.flatMap(new Func1<SBAuthorizationRuleInner, Observable<NamespaceSBAuthorizationRule>>() {
@Override
public NamespaceSBAuthorizationRule call(SBAuthorizationRuleInner inner) {
return wrapNamespaceSBAuthorizationRuleModel(inner);
public Observable<NamespaceSBAuthorizationRule> call(SBAuthorizationRuleInner inner) {
if (inner == null) {
return Observable.empty();
} else {
return Observable.just((NamespaceSBAuthorizationRule)wrapNamespaceSBAuthorizationRuleModel(inner));
}
}
});
}
Expand Down Expand Up @@ -240,6 +248,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