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 cosmos-db/resource-manager] Add VNet related properties to CosmosDB #57

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
@@ -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.cosmosdb;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* Virtual Network ACL Rule object.
*/
public class VirtualNetworkRule {
/**
* Resource ID of a subnet, for example:
* /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}.
*/
@JsonProperty(value = "id")
private String id;

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

/**
* Set the id value.
*
* @param id the id value to set
* @return the VirtualNetworkRule object itself.
*/
public VirtualNetworkRule withId(String id) {
this.id = id;
return this;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import java.util.List;
import com.microsoft.azure.management.cosmosdb.Location;
import com.microsoft.azure.management.cosmosdb.Capability;
import com.microsoft.azure.management.cosmosdb.VirtualNetworkRule;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.microsoft.rest.serializer.JsonFlatten;
import com.microsoft.azure.Resource;
Expand Down Expand Up @@ -58,6 +59,12 @@ public class DatabaseAccountCreateUpdateParametersInner extends Resource {
@JsonProperty(value = "properties.ipRangeFilter")
private String ipRangeFilter;

/**
* Flag to indicate whether to enable/disable Virtual Network ACL rules.
*/
@JsonProperty(value = "properties.isVirtualNetworkFilterEnabled")
private Boolean isVirtualNetworkFilterEnabled;

/**
* Enables automatic failover of the write region in the rare event that
* the region is unavailable due to an outage. Automatic failover will
Expand All @@ -73,6 +80,12 @@ public class DatabaseAccountCreateUpdateParametersInner extends Resource {
@JsonProperty(value = "properties.capabilities")
private List<Capability> capabilities;

/**
* List of Virtual Network ACL rules configured for the Cosmos DB account.
*/
@JsonProperty(value = "properties.virtualNetworkRules")
private List<VirtualNetworkRule> virtualNetworkRules;

/**
* Creates an instance of DatabaseAccountCreateUpdateParametersInner class.
*/
Expand Down Expand Up @@ -180,6 +193,26 @@ public DatabaseAccountCreateUpdateParametersInner withIpRangeFilter(String ipRan
return this;
}

/**
* Get the isVirtualNetworkFilterEnabled value.
*
* @return the isVirtualNetworkFilterEnabled value
*/
public Boolean isVirtualNetworkFilterEnabled() {
return this.isVirtualNetworkFilterEnabled;
}

/**
* Set the isVirtualNetworkFilterEnabled value.
*
* @param isVirtualNetworkFilterEnabled the isVirtualNetworkFilterEnabled value to set
* @return the DatabaseAccountCreateUpdateParametersInner object itself.
*/
public DatabaseAccountCreateUpdateParametersInner withIsVirtualNetworkFilterEnabled(Boolean isVirtualNetworkFilterEnabled) {
this.isVirtualNetworkFilterEnabled = isVirtualNetworkFilterEnabled;
return this;
}

/**
* Get the enableAutomaticFailover value.
*
Expand Down Expand Up @@ -220,4 +253,24 @@ public DatabaseAccountCreateUpdateParametersInner withCapabilities(List<Capabili
return this;
}

/**
* Get the virtualNetworkRules value.
*
* @return the virtualNetworkRules value
*/
public List<VirtualNetworkRule> virtualNetworkRules() {
return this.virtualNetworkRules;
}

/**
* Set the virtualNetworkRules value.
*
* @param virtualNetworkRules the virtualNetworkRules value to set
* @return the DatabaseAccountCreateUpdateParametersInner object itself.
*/
public DatabaseAccountCreateUpdateParametersInner withVirtualNetworkRules(List<VirtualNetworkRule> virtualNetworkRules) {
this.virtualNetworkRules = virtualNetworkRules;
return this;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import java.util.List;
import com.microsoft.azure.management.cosmosdb.Capability;
import com.microsoft.azure.management.cosmosdb.Location;
import com.microsoft.azure.management.cosmosdb.VirtualNetworkRule;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.microsoft.rest.serializer.JsonFlatten;
import com.microsoft.azure.Resource;
Expand Down Expand Up @@ -59,6 +60,12 @@ public class DatabaseAccountInner extends Resource {
@JsonProperty(value = "properties.ipRangeFilter")
private String ipRangeFilter;

/**
* Flag to indicate whether to enable/disable Virtual Network ACL rules.
*/
@JsonProperty(value = "properties.isVirtualNetworkFilterEnabled")
private Boolean isVirtualNetworkFilterEnabled;

/**
* Enables automatic failover of the write region in the rare event that
* the region is unavailable due to an outage. Automatic failover will
Expand Down Expand Up @@ -99,6 +106,12 @@ public class DatabaseAccountInner extends Resource {
@JsonProperty(value = "properties.failoverPolicies", access = JsonProperty.Access.WRITE_ONLY)
private List<FailoverPolicyInner> failoverPolicies;

/**
* List of Virtual Network ACL rules configured for the Cosmos DB account.
*/
@JsonProperty(value = "properties.virtualNetworkRules")
private List<VirtualNetworkRule> virtualNetworkRules;

/**
* Get the kind value.
*
Expand Down Expand Up @@ -177,6 +190,26 @@ public DatabaseAccountInner withIpRangeFilter(String ipRangeFilter) {
return this;
}

/**
* Get the isVirtualNetworkFilterEnabled value.
*
* @return the isVirtualNetworkFilterEnabled value
*/
public Boolean isVirtualNetworkFilterEnabled() {
return this.isVirtualNetworkFilterEnabled;
}

/**
* Set the isVirtualNetworkFilterEnabled value.
*
* @param isVirtualNetworkFilterEnabled the isVirtualNetworkFilterEnabled value to set
* @return the DatabaseAccountInner object itself.
*/
public DatabaseAccountInner withIsVirtualNetworkFilterEnabled(Boolean isVirtualNetworkFilterEnabled) {
this.isVirtualNetworkFilterEnabled = isVirtualNetworkFilterEnabled;
return this;
}

/**
* Get the enableAutomaticFailover value.
*
Expand Down Expand Up @@ -264,4 +297,24 @@ public List<FailoverPolicyInner> failoverPolicies() {
return this.failoverPolicies;
}

/**
* Get the virtualNetworkRules value.
*
* @return the virtualNetworkRules value
*/
public List<VirtualNetworkRule> virtualNetworkRules() {
return this.virtualNetworkRules;
}

/**
* Set the virtualNetworkRules value.
*
* @param virtualNetworkRules the virtualNetworkRules value to set
* @return the DatabaseAccountInner object itself.
*/
public DatabaseAccountInner withVirtualNetworkRules(List<VirtualNetworkRule> virtualNetworkRules) {
this.virtualNetworkRules = virtualNetworkRules;
return this;
}

}