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 containerregistry/resource-manager] [ACR] Add Helm actions to webhook #2754

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,38 @@
/**
* 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.containerregistry.v2017_10_01;

import java.util.Collection;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.microsoft.rest.ExpandableStringEnum;

/**
* Defines values for Action.
*/
public final class Action extends ExpandableStringEnum<Action> {
/** Static value Allow for Action. */
public static final Action ALLOW = fromString("Allow");

/**
* Creates or finds a Action from its string representation.
* @param name a name to look for
* @return the corresponding Action
*/
@JsonCreator
public static Action fromString(String name) {
return fromString(name, Action.class);
}

/**
* @return known Action values
*/
public static Collection<Action> values() {
return values(Action.class);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
/**
* 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.containerregistry.v2017_10_01;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* IP rule with specific IP or IP range in CIDR format.
*/
public class IPRule {
/**
* The action of IP ACL rule. Possible values include: 'Allow'.
*/
@JsonProperty(value = "action")
private Action action;

/**
* Specifies the IP or IP range in CIDR format. Only IPV4 address is
* allowed.
*/
@JsonProperty(value = "value", required = true)
private String iPAddressOrRange;

/**
* Get the action of IP ACL rule. Possible values include: 'Allow'.
*
* @return the action value
*/
public Action action() {
return this.action;
}

/**
* Set the action of IP ACL rule. Possible values include: 'Allow'.
*
* @param action the action value to set
* @return the IPRule object itself.
*/
public IPRule withAction(Action action) {
this.action = action;
return this;
}

/**
* Get specifies the IP or IP range in CIDR format. Only IPV4 address is allowed.
*
* @return the iPAddressOrRange value
*/
public String iPAddressOrRange() {
return this.iPAddressOrRange;
}

/**
* Set specifies the IP or IP range in CIDR format. Only IPV4 address is allowed.
*
* @param iPAddressOrRange the iPAddressOrRange value to set
* @return the IPRule object itself.
*/
public IPRule withIPAddressOrRange(String iPAddressOrRange) {
this.iPAddressOrRange = iPAddressOrRange;
return this;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ public class NetworkRuleSet {
@JsonProperty(value = "virtualNetworkRules")
private List<VirtualNetworkRule> virtualNetworkRules;

/**
* The IP ACL rules.
*/
@JsonProperty(value = "ipRules")
private List<IPRule> ipRules;

/**
* Get the default action of allow or deny when no other rules match. Possible values include: 'Allow', 'Deny'.
*
Expand Down Expand Up @@ -68,4 +74,24 @@ public NetworkRuleSet withVirtualNetworkRules(List<VirtualNetworkRule> virtualNe
return this;
}

/**
* Get the IP ACL rules.
*
* @return the ipRules value
*/
public List<IPRule> ipRules() {
return this.ipRules;
}

/**
* Set the IP ACL rules.
*
* @param ipRules the ipRules value to set
* @return the NetworkRuleSet object itself.
*/
public NetworkRuleSet withIpRules(List<IPRule> ipRules) {
this.ipRules = ipRules;
return this;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,59 @@
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* The virtual network rule for a container registry.
* Virtual network rule.
*/
public class VirtualNetworkRule {
/**
* The action of virtual network rule. Possible values include: 'Allow'.
*/
@JsonProperty(value = "action")
private Action action;

/**
* Resource ID of a subnet, for example:
* /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}.
*/
@JsonProperty(value = "id", required = true)
private String id;
private String virtualNetworkResourceId;

/**
* Get the action of virtual network rule. Possible values include: 'Allow'.
*
* @return the action value
*/
public Action action() {
return this.action;
}

/**
* Set the action of virtual network rule. Possible values include: 'Allow'.
*
* @param action the action value to set
* @return the VirtualNetworkRule object itself.
*/
public VirtualNetworkRule withAction(Action action) {
this.action = action;
return this;
}

/**
* Get resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}.
*
* @return the id value
* @return the virtualNetworkResourceId value
*/
public String id() {
return this.id;
public String virtualNetworkResourceId() {
return this.virtualNetworkResourceId;
}

/**
* Set resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}.
*
* @param id the id value to set
* @param virtualNetworkResourceId the virtualNetworkResourceId value to set
* @return the VirtualNetworkRule object itself.
*/
public VirtualNetworkRule withId(String id) {
this.id = id;
public VirtualNetworkRule withVirtualNetworkResourceId(String virtualNetworkResourceId) {
this.virtualNetworkResourceId = virtualNetworkResourceId;
return this;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ public final class WebhookAction extends ExpandableStringEnum<WebhookAction> {
/** Static value quarantine for WebhookAction. */
public static final WebhookAction QUARANTINE = fromString("quarantine");

/** Static value chart_push for WebhookAction. */
public static final WebhookAction CHART_PUSH = fromString("chart_push");

/** Static value chart_delete for WebhookAction. */
public static final WebhookAction CHART_DELETE = fromString("chart_delete");

/**
* Creates or finds a WebhookAction from its string representation.
* @param name a name to look for
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/**
* 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.containerregistry.v2018_02_01_preview;

import java.util.Collection;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.microsoft.rest.ExpandableStringEnum;

/**
* Defines values for Action.
*/
public final class Action extends ExpandableStringEnum<Action> {
/** Static value Allow for Action. */
public static final Action ALLOW = fromString("Allow");

/**
* Creates or finds a Action from its string representation.
* @param name a name to look for
* @return the corresponding Action
*/
@JsonCreator
public static Action fromString(String name) {
return fromString(name, Action.class);
}

/**
* @return known Action values
*/
public static Collection<Action> values() {
return values(Action.class);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
/**
* 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.containerregistry.v2018_02_01_preview;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* IP rule with specific IP or IP range in CIDR format.
*/
public class IPRule {
/**
* The action of IP ACL rule. Possible values include: 'Allow'.
*/
@JsonProperty(value = "action")
private Action action;

/**
* Specifies the IP or IP range in CIDR format. Only IPV4 address is
* allowed.
*/
@JsonProperty(value = "value", required = true)
private String iPAddressOrRange;

/**
* Get the action of IP ACL rule. Possible values include: 'Allow'.
*
* @return the action value
*/
public Action action() {
return this.action;
}

/**
* Set the action of IP ACL rule. Possible values include: 'Allow'.
*
* @param action the action value to set
* @return the IPRule object itself.
*/
public IPRule withAction(Action action) {
this.action = action;
return this;
}

/**
* Get specifies the IP or IP range in CIDR format. Only IPV4 address is allowed.
*
* @return the iPAddressOrRange value
*/
public String iPAddressOrRange() {
return this.iPAddressOrRange;
}

/**
* Set specifies the IP or IP range in CIDR format. Only IPV4 address is allowed.
*
* @param iPAddressOrRange the iPAddressOrRange value to set
* @return the IPRule object itself.
*/
public IPRule withIPAddressOrRange(String iPAddressOrRange) {
this.iPAddressOrRange = iPAddressOrRange;
return this;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ public class NetworkRuleSet {
@JsonProperty(value = "virtualNetworkRules")
private List<VirtualNetworkRule> virtualNetworkRules;

/**
* The IP ACL rules.
*/
@JsonProperty(value = "ipRules")
private List<IPRule> ipRules;

/**
* Get the default action of allow or deny when no other rules match. Possible values include: 'Allow', 'Deny'.
*
Expand Down Expand Up @@ -68,4 +74,24 @@ public NetworkRuleSet withVirtualNetworkRules(List<VirtualNetworkRule> virtualNe
return this;
}

/**
* Get the IP ACL rules.
*
* @return the ipRules value
*/
public List<IPRule> ipRules() {
return this.ipRules;
}

/**
* Set the IP ACL rules.
*
* @param ipRules the ipRules value to set
* @return the NetworkRuleSet object itself.
*/
public NetworkRuleSet withIpRules(List<IPRule> ipRules) {
this.ipRules = ipRules;
return this;
}

}
Loading