diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Access.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Access.java index ce4201744d0..f2153801716 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Access.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Access.java @@ -8,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for Access. */ -public final class Access { +public final class Access extends ExpandableStringEnum { /** Static value Allow for Access. */ - public static final Access ALLOW = new Access("Allow"); + public static final Access ALLOW = fromString("Allow"); /** Static value Deny for Access. */ - public static final Access DENY = new Access("Deny"); - - private String value; + public static final Access DENY = fromString("Deny"); /** - * Creates a custom value for Access. - * @param value the custom value + * Creates or finds a Access from its string representation. + * @param name a name to look for + * @return the corresponding Access */ - public Access(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static Access fromString(String name) { + return fromString(name, Access.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof Access)) { - return false; - } - if (obj == this) { - return true; - } - Access rhs = (Access) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known Access values + */ + public static Collection values() { + return values(Access.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AddressSpace.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AddressSpace.java index bff623ea33a..43486a61b40 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AddressSpace.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AddressSpace.java @@ -24,7 +24,7 @@ public class AddressSpace { private List addressPrefixes; /** - * Get the addressPrefixes value. + * Get a list of address blocks reserved for this virtual network in CIDR notation. * * @return the addressPrefixes value */ @@ -33,7 +33,7 @@ public List addressPrefixes() { } /** - * Set the addressPrefixes value. + * Set a list of address blocks reserved for this virtual network in CIDR notation. * * @param addressPrefixes the addressPrefixes value to set * @return the AddressSpace object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayBackendAddress.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayBackendAddress.java index c82875be86c..a906f925409 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayBackendAddress.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayBackendAddress.java @@ -27,7 +27,7 @@ public class ApplicationGatewayBackendAddress { private String ipAddress; /** - * Get the fqdn value. + * Get fully qualified domain name (FQDN). * * @return the fqdn value */ @@ -36,7 +36,7 @@ public String fqdn() { } /** - * Set the fqdn value. + * Set fully qualified domain name (FQDN). * * @param fqdn the fqdn value to set * @return the ApplicationGatewayBackendAddress object itself. @@ -47,7 +47,7 @@ public ApplicationGatewayBackendAddress withFqdn(String fqdn) { } /** - * Get the ipAddress value. + * Get iP address. * * @return the ipAddress value */ @@ -56,12 +56,12 @@ public String ipAddress() { } /** - * Set the ipAddress value. + * Set iP address. * * @param ipAddress the ipAddress value to set * @return the ApplicationGatewayBackendAddress object itself. */ - public ApplicationGatewayBackendAddress withIPAddress(String ipAddress) { + public ApplicationGatewayBackendAddress withIpAddress(String ipAddress) { this.ipAddress = ipAddress; return this; } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayBackendHealthHttpSettings.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayBackendHealthHttpSettings.java index 910b6c01975..fef8bc9b04a 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayBackendHealthHttpSettings.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayBackendHealthHttpSettings.java @@ -29,7 +29,7 @@ public class ApplicationGatewayBackendHealthHttpSettings { private List servers; /** - * Get the backendHttpSettings value. + * Get reference of an ApplicationGatewayBackendHttpSettings resource. * * @return the backendHttpSettings value */ @@ -38,7 +38,7 @@ public ApplicationGatewayBackendHttpSettingsInner backendHttpSettings() { } /** - * Set the backendHttpSettings value. + * Set reference of an ApplicationGatewayBackendHttpSettings resource. * * @param backendHttpSettings the backendHttpSettings value to set * @return the ApplicationGatewayBackendHealthHttpSettings object itself. @@ -49,7 +49,7 @@ public ApplicationGatewayBackendHealthHttpSettings withBackendHttpSettings(Appli } /** - * Get the servers value. + * Get list of ApplicationGatewayBackendHealthServer resources. * * @return the servers value */ @@ -58,7 +58,7 @@ public List servers() { } /** - * Set the servers value. + * Set list of ApplicationGatewayBackendHealthServer resources. * * @param servers the servers value to set * @return the ApplicationGatewayBackendHealthHttpSettings object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayBackendHealthPool.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayBackendHealthPool.java index 538a1333fba..6833cd21cdb 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayBackendHealthPool.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayBackendHealthPool.java @@ -29,7 +29,7 @@ public class ApplicationGatewayBackendHealthPool { private List backendHttpSettingsCollection; /** - * Get the backendAddressPool value. + * Get reference of an ApplicationGatewayBackendAddressPool resource. * * @return the backendAddressPool value */ @@ -38,7 +38,7 @@ public ApplicationGatewayBackendAddressPoolInner backendAddressPool() { } /** - * Set the backendAddressPool value. + * Set reference of an ApplicationGatewayBackendAddressPool resource. * * @param backendAddressPool the backendAddressPool value to set * @return the ApplicationGatewayBackendHealthPool object itself. @@ -49,7 +49,7 @@ public ApplicationGatewayBackendHealthPool withBackendAddressPool(ApplicationGat } /** - * Get the backendHttpSettingsCollection value. + * Get list of ApplicationGatewayBackendHealthHttpSettings resources. * * @return the backendHttpSettingsCollection value */ @@ -58,7 +58,7 @@ public List backendHttpSettingsColl } /** - * Set the backendHttpSettingsCollection value. + * Set list of ApplicationGatewayBackendHealthHttpSettings resources. * * @param backendHttpSettingsCollection the backendHttpSettingsCollection value to set * @return the ApplicationGatewayBackendHealthPool object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayBackendHealthServer.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayBackendHealthServer.java index f73c09c9c4f..507b3db2328 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayBackendHealthServer.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayBackendHealthServer.java @@ -35,7 +35,7 @@ public class ApplicationGatewayBackendHealthServer { private ApplicationGatewayBackendHealthServerHealth health; /** - * Get the address value. + * Get iP address or FQDN of backend server. * * @return the address value */ @@ -44,7 +44,7 @@ public String address() { } /** - * Set the address value. + * Set iP address or FQDN of backend server. * * @param address the address value to set * @return the ApplicationGatewayBackendHealthServer object itself. @@ -55,7 +55,7 @@ public ApplicationGatewayBackendHealthServer withAddress(String address) { } /** - * Get the ipConfiguration value. + * Get reference of IP configuration of backend server. * * @return the ipConfiguration value */ @@ -64,7 +64,7 @@ public NetworkInterfaceIPConfigurationInner ipConfiguration() { } /** - * Set the ipConfiguration value. + * Set reference of IP configuration of backend server. * * @param ipConfiguration the ipConfiguration value to set * @return the ApplicationGatewayBackendHealthServer object itself. @@ -75,7 +75,7 @@ public ApplicationGatewayBackendHealthServer withIpConfiguration(NetworkInterfac } /** - * Get the health value. + * Get health of backend server. Possible values include: 'Unknown', 'Up', 'Down', 'Partial', 'Draining'. * * @return the health value */ @@ -84,7 +84,7 @@ public ApplicationGatewayBackendHealthServerHealth health() { } /** - * Set the health value. + * Set health of backend server. Possible values include: 'Unknown', 'Up', 'Down', 'Partial', 'Draining'. * * @param health the health value to set * @return the ApplicationGatewayBackendHealthServer object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayBackendHealthServerHealth.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayBackendHealthServerHealth.java index 7a4002b35c2..bd3103cb74a 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayBackendHealthServerHealth.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayBackendHealthServerHealth.java @@ -8,61 +8,43 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for ApplicationGatewayBackendHealthServerHealth. */ -public final class ApplicationGatewayBackendHealthServerHealth { +public final class ApplicationGatewayBackendHealthServerHealth extends ExpandableStringEnum { /** Static value Unknown for ApplicationGatewayBackendHealthServerHealth. */ - public static final ApplicationGatewayBackendHealthServerHealth UNKNOWN = new ApplicationGatewayBackendHealthServerHealth("Unknown"); + public static final ApplicationGatewayBackendHealthServerHealth UNKNOWN = fromString("Unknown"); /** Static value Up for ApplicationGatewayBackendHealthServerHealth. */ - public static final ApplicationGatewayBackendHealthServerHealth UP = new ApplicationGatewayBackendHealthServerHealth("Up"); + public static final ApplicationGatewayBackendHealthServerHealth UP = fromString("Up"); /** Static value Down for ApplicationGatewayBackendHealthServerHealth. */ - public static final ApplicationGatewayBackendHealthServerHealth DOWN = new ApplicationGatewayBackendHealthServerHealth("Down"); + public static final ApplicationGatewayBackendHealthServerHealth DOWN = fromString("Down"); /** Static value Partial for ApplicationGatewayBackendHealthServerHealth. */ - public static final ApplicationGatewayBackendHealthServerHealth PARTIAL = new ApplicationGatewayBackendHealthServerHealth("Partial"); + public static final ApplicationGatewayBackendHealthServerHealth PARTIAL = fromString("Partial"); /** Static value Draining for ApplicationGatewayBackendHealthServerHealth. */ - public static final ApplicationGatewayBackendHealthServerHealth DRAINING = new ApplicationGatewayBackendHealthServerHealth("Draining"); - - private String value; + public static final ApplicationGatewayBackendHealthServerHealth DRAINING = fromString("Draining"); /** - * Creates a custom value for ApplicationGatewayBackendHealthServerHealth. - * @param value the custom value + * Creates or finds a ApplicationGatewayBackendHealthServerHealth from its string representation. + * @param name a name to look for + * @return the corresponding ApplicationGatewayBackendHealthServerHealth */ - public ApplicationGatewayBackendHealthServerHealth(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static ApplicationGatewayBackendHealthServerHealth fromString(String name) { + return fromString(name, ApplicationGatewayBackendHealthServerHealth.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof ApplicationGatewayBackendHealthServerHealth)) { - return false; - } - if (obj == this) { - return true; - } - ApplicationGatewayBackendHealthServerHealth rhs = (ApplicationGatewayBackendHealthServerHealth) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known ApplicationGatewayBackendHealthServerHealth values + */ + public static Collection values() { + return values(ApplicationGatewayBackendHealthServerHealth.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayConnectionDraining.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayConnectionDraining.java index c9efdbc1178..500fe928366 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayConnectionDraining.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayConnectionDraining.java @@ -30,7 +30,7 @@ public class ApplicationGatewayConnectionDraining { private int drainTimeoutInSec; /** - * Get the enabled value. + * Get whether connection draining is enabled or not. * * @return the enabled value */ @@ -39,7 +39,7 @@ public boolean enabled() { } /** - * Set the enabled value. + * Set whether connection draining is enabled or not. * * @param enabled the enabled value to set * @return the ApplicationGatewayConnectionDraining object itself. @@ -50,7 +50,7 @@ public ApplicationGatewayConnectionDraining withEnabled(boolean enabled) { } /** - * Get the drainTimeoutInSec value. + * Get the number of seconds connection draining is active. Acceptable values are from 1 second to 3600 seconds. * * @return the drainTimeoutInSec value */ @@ -59,7 +59,7 @@ public int drainTimeoutInSec() { } /** - * Set the drainTimeoutInSec value. + * Set the number of seconds connection draining is active. Acceptable values are from 1 second to 3600 seconds. * * @param drainTimeoutInSec the drainTimeoutInSec value to set * @return the ApplicationGatewayConnectionDraining object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayCookieBasedAffinity.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayCookieBasedAffinity.java index 23ff1003902..bb652e26e9a 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayCookieBasedAffinity.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayCookieBasedAffinity.java @@ -8,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for ApplicationGatewayCookieBasedAffinity. */ -public final class ApplicationGatewayCookieBasedAffinity { +public final class ApplicationGatewayCookieBasedAffinity extends ExpandableStringEnum { /** Static value Enabled for ApplicationGatewayCookieBasedAffinity. */ - public static final ApplicationGatewayCookieBasedAffinity ENABLED = new ApplicationGatewayCookieBasedAffinity("Enabled"); + public static final ApplicationGatewayCookieBasedAffinity ENABLED = fromString("Enabled"); /** Static value Disabled for ApplicationGatewayCookieBasedAffinity. */ - public static final ApplicationGatewayCookieBasedAffinity DISABLED = new ApplicationGatewayCookieBasedAffinity("Disabled"); - - private String value; + public static final ApplicationGatewayCookieBasedAffinity DISABLED = fromString("Disabled"); /** - * Creates a custom value for ApplicationGatewayCookieBasedAffinity. - * @param value the custom value + * Creates or finds a ApplicationGatewayCookieBasedAffinity from its string representation. + * @param name a name to look for + * @return the corresponding ApplicationGatewayCookieBasedAffinity */ - public ApplicationGatewayCookieBasedAffinity(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static ApplicationGatewayCookieBasedAffinity fromString(String name) { + return fromString(name, ApplicationGatewayCookieBasedAffinity.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof ApplicationGatewayCookieBasedAffinity)) { - return false; - } - if (obj == this) { - return true; - } - ApplicationGatewayCookieBasedAffinity rhs = (ApplicationGatewayCookieBasedAffinity) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known ApplicationGatewayCookieBasedAffinity values + */ + public static Collection values() { + return values(ApplicationGatewayCookieBasedAffinity.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayFirewallDisabledRuleGroup.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayFirewallDisabledRuleGroup.java index 41da4be5802..5a876ab0acf 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayFirewallDisabledRuleGroup.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayFirewallDisabledRuleGroup.java @@ -29,7 +29,7 @@ public class ApplicationGatewayFirewallDisabledRuleGroup { private List rules; /** - * Get the ruleGroupName value. + * Get the name of the rule group that will be disabled. * * @return the ruleGroupName value */ @@ -38,7 +38,7 @@ public String ruleGroupName() { } /** - * Set the ruleGroupName value. + * Set the name of the rule group that will be disabled. * * @param ruleGroupName the ruleGroupName value to set * @return the ApplicationGatewayFirewallDisabledRuleGroup object itself. @@ -49,7 +49,7 @@ public ApplicationGatewayFirewallDisabledRuleGroup withRuleGroupName(String rule } /** - * Get the rules value. + * Get the list of rules that will be disabled. If null, all rules of the rule group will be disabled. * * @return the rules value */ @@ -58,7 +58,7 @@ public List rules() { } /** - * Set the rules value. + * Set the list of rules that will be disabled. If null, all rules of the rule group will be disabled. * * @param rules the rules value to set * @return the ApplicationGatewayFirewallDisabledRuleGroup object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayFirewallMode.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayFirewallMode.java index f81e77acd11..be16780e247 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayFirewallMode.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayFirewallMode.java @@ -8,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for ApplicationGatewayFirewallMode. */ -public final class ApplicationGatewayFirewallMode { +public final class ApplicationGatewayFirewallMode extends ExpandableStringEnum { /** Static value Detection for ApplicationGatewayFirewallMode. */ - public static final ApplicationGatewayFirewallMode DETECTION = new ApplicationGatewayFirewallMode("Detection"); + public static final ApplicationGatewayFirewallMode DETECTION = fromString("Detection"); /** Static value Prevention for ApplicationGatewayFirewallMode. */ - public static final ApplicationGatewayFirewallMode PREVENTION = new ApplicationGatewayFirewallMode("Prevention"); - - private String value; + public static final ApplicationGatewayFirewallMode PREVENTION = fromString("Prevention"); /** - * Creates a custom value for ApplicationGatewayFirewallMode. - * @param value the custom value + * Creates or finds a ApplicationGatewayFirewallMode from its string representation. + * @param name a name to look for + * @return the corresponding ApplicationGatewayFirewallMode */ - public ApplicationGatewayFirewallMode(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static ApplicationGatewayFirewallMode fromString(String name) { + return fromString(name, ApplicationGatewayFirewallMode.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof ApplicationGatewayFirewallMode)) { - return false; - } - if (obj == this) { - return true; - } - ApplicationGatewayFirewallMode rhs = (ApplicationGatewayFirewallMode) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known ApplicationGatewayFirewallMode values + */ + public static Collection values() { + return values(ApplicationGatewayFirewallMode.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayFirewallRule.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayFirewallRule.java index 96aa1f38256..28f7454ebd7 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayFirewallRule.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayFirewallRule.java @@ -27,7 +27,7 @@ public class ApplicationGatewayFirewallRule { private String description; /** - * Get the ruleId value. + * Get the identifier of the web application firewall rule. * * @return the ruleId value */ @@ -36,7 +36,7 @@ public int ruleId() { } /** - * Set the ruleId value. + * Set the identifier of the web application firewall rule. * * @param ruleId the ruleId value to set * @return the ApplicationGatewayFirewallRule object itself. @@ -47,7 +47,7 @@ public ApplicationGatewayFirewallRule withRuleId(int ruleId) { } /** - * Get the description value. + * Get the description of the web application firewall rule. * * @return the description value */ @@ -56,7 +56,7 @@ public String description() { } /** - * Set the description value. + * Set the description of the web application firewall rule. * * @param description the description value to set * @return the ApplicationGatewayFirewallRule object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayFirewallRuleGroup.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayFirewallRuleGroup.java index cd9aa0676d0..9f6a90d478a 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayFirewallRuleGroup.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayFirewallRuleGroup.java @@ -34,7 +34,7 @@ public class ApplicationGatewayFirewallRuleGroup { private List rules; /** - * Get the ruleGroupName value. + * Get the name of the web application firewall rule group. * * @return the ruleGroupName value */ @@ -43,7 +43,7 @@ public String ruleGroupName() { } /** - * Set the ruleGroupName value. + * Set the name of the web application firewall rule group. * * @param ruleGroupName the ruleGroupName value to set * @return the ApplicationGatewayFirewallRuleGroup object itself. @@ -54,7 +54,7 @@ public ApplicationGatewayFirewallRuleGroup withRuleGroupName(String ruleGroupNam } /** - * Get the description value. + * Get the description of the web application firewall rule group. * * @return the description value */ @@ -63,7 +63,7 @@ public String description() { } /** - * Set the description value. + * Set the description of the web application firewall rule group. * * @param description the description value to set * @return the ApplicationGatewayFirewallRuleGroup object itself. @@ -74,7 +74,7 @@ public ApplicationGatewayFirewallRuleGroup withDescription(String description) { } /** - * Get the rules value. + * Get the rules of the web application firewall rule group. * * @return the rules value */ @@ -83,7 +83,7 @@ public List rules() { } /** - * Set the rules value. + * Set the rules of the web application firewall rule group. * * @param rules the rules value to set * @return the ApplicationGatewayFirewallRuleGroup object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayOperationalState.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayOperationalState.java index 3150d26f005..7d5189ff262 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayOperationalState.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayOperationalState.java @@ -8,58 +8,40 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for ApplicationGatewayOperationalState. */ -public final class ApplicationGatewayOperationalState { +public final class ApplicationGatewayOperationalState extends ExpandableStringEnum { /** Static value Stopped for ApplicationGatewayOperationalState. */ - public static final ApplicationGatewayOperationalState STOPPED = new ApplicationGatewayOperationalState("Stopped"); + public static final ApplicationGatewayOperationalState STOPPED = fromString("Stopped"); /** Static value Starting for ApplicationGatewayOperationalState. */ - public static final ApplicationGatewayOperationalState STARTING = new ApplicationGatewayOperationalState("Starting"); + public static final ApplicationGatewayOperationalState STARTING = fromString("Starting"); /** Static value Running for ApplicationGatewayOperationalState. */ - public static final ApplicationGatewayOperationalState RUNNING = new ApplicationGatewayOperationalState("Running"); + public static final ApplicationGatewayOperationalState RUNNING = fromString("Running"); /** Static value Stopping for ApplicationGatewayOperationalState. */ - public static final ApplicationGatewayOperationalState STOPPING = new ApplicationGatewayOperationalState("Stopping"); - - private String value; + public static final ApplicationGatewayOperationalState STOPPING = fromString("Stopping"); /** - * Creates a custom value for ApplicationGatewayOperationalState. - * @param value the custom value + * Creates or finds a ApplicationGatewayOperationalState from its string representation. + * @param name a name to look for + * @return the corresponding ApplicationGatewayOperationalState */ - public ApplicationGatewayOperationalState(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static ApplicationGatewayOperationalState fromString(String name) { + return fromString(name, ApplicationGatewayOperationalState.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof ApplicationGatewayOperationalState)) { - return false; - } - if (obj == this) { - return true; - } - ApplicationGatewayOperationalState rhs = (ApplicationGatewayOperationalState) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known ApplicationGatewayOperationalState values + */ + public static Collection values() { + return values(ApplicationGatewayOperationalState.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayProbeHealthResponseMatch.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayProbeHealthResponseMatch.java index e6cd9c55978..1da6efca3ad 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayProbeHealthResponseMatch.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayProbeHealthResponseMatch.java @@ -30,7 +30,7 @@ public class ApplicationGatewayProbeHealthResponseMatch { private List statusCodes; /** - * Get the body value. + * Get body that must be contained in the health response. Default value is empty. * * @return the body value */ @@ -39,7 +39,7 @@ public String body() { } /** - * Set the body value. + * Set body that must be contained in the health response. Default value is empty. * * @param body the body value to set * @return the ApplicationGatewayProbeHealthResponseMatch object itself. @@ -50,7 +50,7 @@ public ApplicationGatewayProbeHealthResponseMatch withBody(String body) { } /** - * Get the statusCodes value. + * Get allowed ranges of healthy status codes. Default range of healthy status codes is 200-399. * * @return the statusCodes value */ @@ -59,7 +59,7 @@ public List statusCodes() { } /** - * Set the statusCodes value. + * Set allowed ranges of healthy status codes. Default range of healthy status codes is 200-399. * * @param statusCodes the statusCodes value to set * @return the ApplicationGatewayProbeHealthResponseMatch object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayProtocol.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayProtocol.java index a06b960129e..ceed6ab34c6 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayProtocol.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayProtocol.java @@ -8,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for ApplicationGatewayProtocol. */ -public final class ApplicationGatewayProtocol { +public final class ApplicationGatewayProtocol extends ExpandableStringEnum { /** Static value Http for ApplicationGatewayProtocol. */ - public static final ApplicationGatewayProtocol HTTP = new ApplicationGatewayProtocol("Http"); + public static final ApplicationGatewayProtocol HTTP = fromString("Http"); /** Static value Https for ApplicationGatewayProtocol. */ - public static final ApplicationGatewayProtocol HTTPS = new ApplicationGatewayProtocol("Https"); - - private String value; + public static final ApplicationGatewayProtocol HTTPS = fromString("Https"); /** - * Creates a custom value for ApplicationGatewayProtocol. - * @param value the custom value + * Creates or finds a ApplicationGatewayProtocol from its string representation. + * @param name a name to look for + * @return the corresponding ApplicationGatewayProtocol */ - public ApplicationGatewayProtocol(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static ApplicationGatewayProtocol fromString(String name) { + return fromString(name, ApplicationGatewayProtocol.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof ApplicationGatewayProtocol)) { - return false; - } - if (obj == this) { - return true; - } - ApplicationGatewayProtocol rhs = (ApplicationGatewayProtocol) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known ApplicationGatewayProtocol values + */ + public static Collection values() { + return values(ApplicationGatewayProtocol.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayRedirectType.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayRedirectType.java index 24d82f76d55..22de2a2c7cb 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayRedirectType.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayRedirectType.java @@ -8,58 +8,40 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for ApplicationGatewayRedirectType. */ -public final class ApplicationGatewayRedirectType { +public final class ApplicationGatewayRedirectType extends ExpandableStringEnum { /** Static value Permanent for ApplicationGatewayRedirectType. */ - public static final ApplicationGatewayRedirectType PERMANENT = new ApplicationGatewayRedirectType("Permanent"); + public static final ApplicationGatewayRedirectType PERMANENT = fromString("Permanent"); /** Static value Found for ApplicationGatewayRedirectType. */ - public static final ApplicationGatewayRedirectType FOUND = new ApplicationGatewayRedirectType("Found"); + public static final ApplicationGatewayRedirectType FOUND = fromString("Found"); /** Static value SeeOther for ApplicationGatewayRedirectType. */ - public static final ApplicationGatewayRedirectType SEE_OTHER = new ApplicationGatewayRedirectType("SeeOther"); + public static final ApplicationGatewayRedirectType SEE_OTHER = fromString("SeeOther"); /** Static value Temporary for ApplicationGatewayRedirectType. */ - public static final ApplicationGatewayRedirectType TEMPORARY = new ApplicationGatewayRedirectType("Temporary"); - - private String value; + public static final ApplicationGatewayRedirectType TEMPORARY = fromString("Temporary"); /** - * Creates a custom value for ApplicationGatewayRedirectType. - * @param value the custom value + * Creates or finds a ApplicationGatewayRedirectType from its string representation. + * @param name a name to look for + * @return the corresponding ApplicationGatewayRedirectType */ - public ApplicationGatewayRedirectType(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static ApplicationGatewayRedirectType fromString(String name) { + return fromString(name, ApplicationGatewayRedirectType.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof ApplicationGatewayRedirectType)) { - return false; - } - if (obj == this) { - return true; - } - ApplicationGatewayRedirectType rhs = (ApplicationGatewayRedirectType) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known ApplicationGatewayRedirectType values + */ + public static Collection values() { + return values(ApplicationGatewayRedirectType.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayRequestRoutingRuleType.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayRequestRoutingRuleType.java index 304f48e1737..7950ab166b6 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayRequestRoutingRuleType.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayRequestRoutingRuleType.java @@ -8,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for ApplicationGatewayRequestRoutingRuleType. */ -public final class ApplicationGatewayRequestRoutingRuleType { +public final class ApplicationGatewayRequestRoutingRuleType extends ExpandableStringEnum { /** Static value Basic for ApplicationGatewayRequestRoutingRuleType. */ - public static final ApplicationGatewayRequestRoutingRuleType BASIC = new ApplicationGatewayRequestRoutingRuleType("Basic"); + public static final ApplicationGatewayRequestRoutingRuleType BASIC = fromString("Basic"); /** Static value PathBasedRouting for ApplicationGatewayRequestRoutingRuleType. */ - public static final ApplicationGatewayRequestRoutingRuleType PATH_BASED_ROUTING = new ApplicationGatewayRequestRoutingRuleType("PathBasedRouting"); - - private String value; + public static final ApplicationGatewayRequestRoutingRuleType PATH_BASED_ROUTING = fromString("PathBasedRouting"); /** - * Creates a custom value for ApplicationGatewayRequestRoutingRuleType. - * @param value the custom value + * Creates or finds a ApplicationGatewayRequestRoutingRuleType from its string representation. + * @param name a name to look for + * @return the corresponding ApplicationGatewayRequestRoutingRuleType */ - public ApplicationGatewayRequestRoutingRuleType(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static ApplicationGatewayRequestRoutingRuleType fromString(String name) { + return fromString(name, ApplicationGatewayRequestRoutingRuleType.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof ApplicationGatewayRequestRoutingRuleType)) { - return false; - } - if (obj == this) { - return true; - } - ApplicationGatewayRequestRoutingRuleType rhs = (ApplicationGatewayRequestRoutingRuleType) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known ApplicationGatewayRequestRoutingRuleType values + */ + public static Collection values() { + return values(ApplicationGatewayRequestRoutingRuleType.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewaySku.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewaySku.java index edef3480328..b63a146796f 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewaySku.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewaySku.java @@ -36,7 +36,7 @@ public class ApplicationGatewaySku { private Integer capacity; /** - * Get the name value. + * Get name of an application gateway SKU. Possible values include: 'Standard_Small', 'Standard_Medium', 'Standard_Large', 'WAF_Medium', 'WAF_Large'. * * @return the name value */ @@ -45,7 +45,7 @@ public ApplicationGatewaySkuName name() { } /** - * Set the name value. + * Set name of an application gateway SKU. Possible values include: 'Standard_Small', 'Standard_Medium', 'Standard_Large', 'WAF_Medium', 'WAF_Large'. * * @param name the name value to set * @return the ApplicationGatewaySku object itself. @@ -56,7 +56,7 @@ public ApplicationGatewaySku withName(ApplicationGatewaySkuName name) { } /** - * Get the tier value. + * Get tier of an application gateway. Possible values include: 'Standard', 'WAF'. * * @return the tier value */ @@ -65,7 +65,7 @@ public ApplicationGatewayTier tier() { } /** - * Set the tier value. + * Set tier of an application gateway. Possible values include: 'Standard', 'WAF'. * * @param tier the tier value to set * @return the ApplicationGatewaySku object itself. @@ -76,7 +76,7 @@ public ApplicationGatewaySku withTier(ApplicationGatewayTier tier) { } /** - * Get the capacity value. + * Get capacity (instance count) of an application gateway. * * @return the capacity value */ @@ -85,7 +85,7 @@ public Integer capacity() { } /** - * Set the capacity value. + * Set capacity (instance count) of an application gateway. * * @param capacity the capacity value to set * @return the ApplicationGatewaySku object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewaySkuName.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewaySkuName.java index 56776cf97c9..54575f5185d 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewaySkuName.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewaySkuName.java @@ -8,61 +8,43 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for ApplicationGatewaySkuName. */ -public final class ApplicationGatewaySkuName { +public final class ApplicationGatewaySkuName extends ExpandableStringEnum { /** Static value Standard_Small for ApplicationGatewaySkuName. */ - public static final ApplicationGatewaySkuName STANDARD_SMALL = new ApplicationGatewaySkuName("Standard_Small"); + public static final ApplicationGatewaySkuName STANDARD_SMALL = fromString("Standard_Small"); /** Static value Standard_Medium for ApplicationGatewaySkuName. */ - public static final ApplicationGatewaySkuName STANDARD_MEDIUM = new ApplicationGatewaySkuName("Standard_Medium"); + public static final ApplicationGatewaySkuName STANDARD_MEDIUM = fromString("Standard_Medium"); /** Static value Standard_Large for ApplicationGatewaySkuName. */ - public static final ApplicationGatewaySkuName STANDARD_LARGE = new ApplicationGatewaySkuName("Standard_Large"); + public static final ApplicationGatewaySkuName STANDARD_LARGE = fromString("Standard_Large"); /** Static value WAF_Medium for ApplicationGatewaySkuName. */ - public static final ApplicationGatewaySkuName WAF_MEDIUM = new ApplicationGatewaySkuName("WAF_Medium"); + public static final ApplicationGatewaySkuName WAF_MEDIUM = fromString("WAF_Medium"); /** Static value WAF_Large for ApplicationGatewaySkuName. */ - public static final ApplicationGatewaySkuName WAF_LARGE = new ApplicationGatewaySkuName("WAF_Large"); - - private String value; + public static final ApplicationGatewaySkuName WAF_LARGE = fromString("WAF_Large"); /** - * Creates a custom value for ApplicationGatewaySkuName. - * @param value the custom value + * Creates or finds a ApplicationGatewaySkuName from its string representation. + * @param name a name to look for + * @return the corresponding ApplicationGatewaySkuName */ - public ApplicationGatewaySkuName(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static ApplicationGatewaySkuName fromString(String name) { + return fromString(name, ApplicationGatewaySkuName.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof ApplicationGatewaySkuName)) { - return false; - } - if (obj == this) { - return true; - } - ApplicationGatewaySkuName rhs = (ApplicationGatewaySkuName) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known ApplicationGatewaySkuName values + */ + public static Collection values() { + return values(ApplicationGatewaySkuName.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewaySslCipherSuite.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewaySslCipherSuite.java index 76a6c4d6510..33161d9e345 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewaySslCipherSuite.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewaySslCipherSuite.java @@ -8,121 +8,103 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for ApplicationGatewaySslCipherSuite. */ -public final class ApplicationGatewaySslCipherSuite { +public final class ApplicationGatewaySslCipherSuite extends ExpandableStringEnum { /** Static value TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 = new ApplicationGatewaySslCipherSuite("TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384"); + public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 = fromString("TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384"); /** Static value TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 = new ApplicationGatewaySslCipherSuite("TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256"); + public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 = fromString("TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256"); /** Static value TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA = new ApplicationGatewaySslCipherSuite("TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA"); + public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA = fromString("TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA"); /** Static value TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA = new ApplicationGatewaySslCipherSuite("TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA"); + public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA = fromString("TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA"); /** Static value TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 = new ApplicationGatewaySslCipherSuite("TLS_DHE_RSA_WITH_AES_256_GCM_SHA384"); + public static final ApplicationGatewaySslCipherSuite TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 = fromString("TLS_DHE_RSA_WITH_AES_256_GCM_SHA384"); /** Static value TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 = new ApplicationGatewaySslCipherSuite("TLS_DHE_RSA_WITH_AES_128_GCM_SHA256"); + public static final ApplicationGatewaySslCipherSuite TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 = fromString("TLS_DHE_RSA_WITH_AES_128_GCM_SHA256"); /** Static value TLS_DHE_RSA_WITH_AES_256_CBC_SHA for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_DHE_RSA_WITH_AES_256_CBC_SHA = new ApplicationGatewaySslCipherSuite("TLS_DHE_RSA_WITH_AES_256_CBC_SHA"); + public static final ApplicationGatewaySslCipherSuite TLS_DHE_RSA_WITH_AES_256_CBC_SHA = fromString("TLS_DHE_RSA_WITH_AES_256_CBC_SHA"); /** Static value TLS_DHE_RSA_WITH_AES_128_CBC_SHA for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_DHE_RSA_WITH_AES_128_CBC_SHA = new ApplicationGatewaySslCipherSuite("TLS_DHE_RSA_WITH_AES_128_CBC_SHA"); + public static final ApplicationGatewaySslCipherSuite TLS_DHE_RSA_WITH_AES_128_CBC_SHA = fromString("TLS_DHE_RSA_WITH_AES_128_CBC_SHA"); /** Static value TLS_RSA_WITH_AES_256_GCM_SHA384 for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_RSA_WITH_AES_256_GCM_SHA384 = new ApplicationGatewaySslCipherSuite("TLS_RSA_WITH_AES_256_GCM_SHA384"); + public static final ApplicationGatewaySslCipherSuite TLS_RSA_WITH_AES_256_GCM_SHA384 = fromString("TLS_RSA_WITH_AES_256_GCM_SHA384"); /** Static value TLS_RSA_WITH_AES_128_GCM_SHA256 for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_RSA_WITH_AES_128_GCM_SHA256 = new ApplicationGatewaySslCipherSuite("TLS_RSA_WITH_AES_128_GCM_SHA256"); + public static final ApplicationGatewaySslCipherSuite TLS_RSA_WITH_AES_128_GCM_SHA256 = fromString("TLS_RSA_WITH_AES_128_GCM_SHA256"); /** Static value TLS_RSA_WITH_AES_256_CBC_SHA256 for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_RSA_WITH_AES_256_CBC_SHA256 = new ApplicationGatewaySslCipherSuite("TLS_RSA_WITH_AES_256_CBC_SHA256"); + public static final ApplicationGatewaySslCipherSuite TLS_RSA_WITH_AES_256_CBC_SHA256 = fromString("TLS_RSA_WITH_AES_256_CBC_SHA256"); /** Static value TLS_RSA_WITH_AES_128_CBC_SHA256 for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_RSA_WITH_AES_128_CBC_SHA256 = new ApplicationGatewaySslCipherSuite("TLS_RSA_WITH_AES_128_CBC_SHA256"); + public static final ApplicationGatewaySslCipherSuite TLS_RSA_WITH_AES_128_CBC_SHA256 = fromString("TLS_RSA_WITH_AES_128_CBC_SHA256"); /** Static value TLS_RSA_WITH_AES_256_CBC_SHA for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_RSA_WITH_AES_256_CBC_SHA = new ApplicationGatewaySslCipherSuite("TLS_RSA_WITH_AES_256_CBC_SHA"); + public static final ApplicationGatewaySslCipherSuite TLS_RSA_WITH_AES_256_CBC_SHA = fromString("TLS_RSA_WITH_AES_256_CBC_SHA"); /** Static value TLS_RSA_WITH_AES_128_CBC_SHA for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_RSA_WITH_AES_128_CBC_SHA = new ApplicationGatewaySslCipherSuite("TLS_RSA_WITH_AES_128_CBC_SHA"); + public static final ApplicationGatewaySslCipherSuite TLS_RSA_WITH_AES_128_CBC_SHA = fromString("TLS_RSA_WITH_AES_128_CBC_SHA"); /** Static value TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 = new ApplicationGatewaySslCipherSuite("TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384"); + public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 = fromString("TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384"); /** Static value TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 = new ApplicationGatewaySslCipherSuite("TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256"); + public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 = fromString("TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256"); /** Static value TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 = new ApplicationGatewaySslCipherSuite("TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384"); + public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 = fromString("TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384"); /** Static value TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 = new ApplicationGatewaySslCipherSuite("TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256"); + public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 = fromString("TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256"); /** Static value TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA = new ApplicationGatewaySslCipherSuite("TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA"); + public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA = fromString("TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA"); /** Static value TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA = new ApplicationGatewaySslCipherSuite("TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA"); + public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA = fromString("TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA"); /** Static value TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 = new ApplicationGatewaySslCipherSuite("TLS_DHE_DSS_WITH_AES_256_CBC_SHA256"); + public static final ApplicationGatewaySslCipherSuite TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 = fromString("TLS_DHE_DSS_WITH_AES_256_CBC_SHA256"); /** Static value TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 = new ApplicationGatewaySslCipherSuite("TLS_DHE_DSS_WITH_AES_128_CBC_SHA256"); + public static final ApplicationGatewaySslCipherSuite TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 = fromString("TLS_DHE_DSS_WITH_AES_128_CBC_SHA256"); /** Static value TLS_DHE_DSS_WITH_AES_256_CBC_SHA for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_DHE_DSS_WITH_AES_256_CBC_SHA = new ApplicationGatewaySslCipherSuite("TLS_DHE_DSS_WITH_AES_256_CBC_SHA"); + public static final ApplicationGatewaySslCipherSuite TLS_DHE_DSS_WITH_AES_256_CBC_SHA = fromString("TLS_DHE_DSS_WITH_AES_256_CBC_SHA"); /** Static value TLS_DHE_DSS_WITH_AES_128_CBC_SHA for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_DHE_DSS_WITH_AES_128_CBC_SHA = new ApplicationGatewaySslCipherSuite("TLS_DHE_DSS_WITH_AES_128_CBC_SHA"); + public static final ApplicationGatewaySslCipherSuite TLS_DHE_DSS_WITH_AES_128_CBC_SHA = fromString("TLS_DHE_DSS_WITH_AES_128_CBC_SHA"); /** Static value TLS_RSA_WITH_3DES_EDE_CBC_SHA for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_RSA_WITH_3DES_EDE_CBC_SHA = new ApplicationGatewaySslCipherSuite("TLS_RSA_WITH_3DES_EDE_CBC_SHA"); - - private String value; + public static final ApplicationGatewaySslCipherSuite TLS_RSA_WITH_3DES_EDE_CBC_SHA = fromString("TLS_RSA_WITH_3DES_EDE_CBC_SHA"); /** - * Creates a custom value for ApplicationGatewaySslCipherSuite. - * @param value the custom value + * Creates or finds a ApplicationGatewaySslCipherSuite from its string representation. + * @param name a name to look for + * @return the corresponding ApplicationGatewaySslCipherSuite */ - public ApplicationGatewaySslCipherSuite(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static ApplicationGatewaySslCipherSuite fromString(String name) { + return fromString(name, ApplicationGatewaySslCipherSuite.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof ApplicationGatewaySslCipherSuite)) { - return false; - } - if (obj == this) { - return true; - } - ApplicationGatewaySslCipherSuite rhs = (ApplicationGatewaySslCipherSuite) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known ApplicationGatewaySslCipherSuite values + */ + public static Collection values() { + return values(ApplicationGatewaySslCipherSuite.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewaySslPolicy.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewaySslPolicy.java index 45d841b26d6..5795bf34357 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewaySslPolicy.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewaySslPolicy.java @@ -50,7 +50,7 @@ public class ApplicationGatewaySslPolicy { private ApplicationGatewaySslProtocol minProtocolVersion; /** - * Get the disabledSslProtocols value. + * Get ssl protocols to be disabled on application gateway. * * @return the disabledSslProtocols value */ @@ -59,7 +59,7 @@ public List disabledSslProtocols() { } /** - * Set the disabledSslProtocols value. + * Set ssl protocols to be disabled on application gateway. * * @param disabledSslProtocols the disabledSslProtocols value to set * @return the ApplicationGatewaySslPolicy object itself. @@ -70,7 +70,7 @@ public ApplicationGatewaySslPolicy withDisabledSslProtocols(List cipherSuites() { } /** - * Set the cipherSuites value. + * Set ssl cipher suites to be enabled in the specified order to application gateway. * * @param cipherSuites the cipherSuites value to set * @return the ApplicationGatewaySslPolicy object itself. @@ -130,7 +130,7 @@ public ApplicationGatewaySslPolicy withCipherSuites(List { /** Static value AppGwSslPolicy20150501 for ApplicationGatewaySslPolicyName. */ - public static final ApplicationGatewaySslPolicyName APP_GW_SSL_POLICY20150501 = new ApplicationGatewaySslPolicyName("AppGwSslPolicy20150501"); + public static final ApplicationGatewaySslPolicyName APP_GW_SSL_POLICY20150501 = fromString("AppGwSslPolicy20150501"); /** Static value AppGwSslPolicy20170401 for ApplicationGatewaySslPolicyName. */ - public static final ApplicationGatewaySslPolicyName APP_GW_SSL_POLICY20170401 = new ApplicationGatewaySslPolicyName("AppGwSslPolicy20170401"); + public static final ApplicationGatewaySslPolicyName APP_GW_SSL_POLICY20170401 = fromString("AppGwSslPolicy20170401"); /** Static value AppGwSslPolicy20170401S for ApplicationGatewaySslPolicyName. */ - public static final ApplicationGatewaySslPolicyName APP_GW_SSL_POLICY20170401S = new ApplicationGatewaySslPolicyName("AppGwSslPolicy20170401S"); - - private String value; + public static final ApplicationGatewaySslPolicyName APP_GW_SSL_POLICY20170401S = fromString("AppGwSslPolicy20170401S"); /** - * Creates a custom value for ApplicationGatewaySslPolicyName. - * @param value the custom value + * Creates or finds a ApplicationGatewaySslPolicyName from its string representation. + * @param name a name to look for + * @return the corresponding ApplicationGatewaySslPolicyName */ - public ApplicationGatewaySslPolicyName(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static ApplicationGatewaySslPolicyName fromString(String name) { + return fromString(name, ApplicationGatewaySslPolicyName.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof ApplicationGatewaySslPolicyName)) { - return false; - } - if (obj == this) { - return true; - } - ApplicationGatewaySslPolicyName rhs = (ApplicationGatewaySslPolicyName) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known ApplicationGatewaySslPolicyName values + */ + public static Collection values() { + return values(ApplicationGatewaySslPolicyName.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewaySslPolicyType.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewaySslPolicyType.java index 64fea67486c..83c892ab1da 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewaySslPolicyType.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewaySslPolicyType.java @@ -8,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for ApplicationGatewaySslPolicyType. */ -public final class ApplicationGatewaySslPolicyType { +public final class ApplicationGatewaySslPolicyType extends ExpandableStringEnum { /** Static value Predefined for ApplicationGatewaySslPolicyType. */ - public static final ApplicationGatewaySslPolicyType PREDEFINED = new ApplicationGatewaySslPolicyType("Predefined"); + public static final ApplicationGatewaySslPolicyType PREDEFINED = fromString("Predefined"); /** Static value Custom for ApplicationGatewaySslPolicyType. */ - public static final ApplicationGatewaySslPolicyType CUSTOM = new ApplicationGatewaySslPolicyType("Custom"); - - private String value; + public static final ApplicationGatewaySslPolicyType CUSTOM = fromString("Custom"); /** - * Creates a custom value for ApplicationGatewaySslPolicyType. - * @param value the custom value + * Creates or finds a ApplicationGatewaySslPolicyType from its string representation. + * @param name a name to look for + * @return the corresponding ApplicationGatewaySslPolicyType */ - public ApplicationGatewaySslPolicyType(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static ApplicationGatewaySslPolicyType fromString(String name) { + return fromString(name, ApplicationGatewaySslPolicyType.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof ApplicationGatewaySslPolicyType)) { - return false; - } - if (obj == this) { - return true; - } - ApplicationGatewaySslPolicyType rhs = (ApplicationGatewaySslPolicyType) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known ApplicationGatewaySslPolicyType values + */ + public static Collection values() { + return values(ApplicationGatewaySslPolicyType.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewaySslProtocol.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewaySslProtocol.java index f086b73f5c8..299136422b5 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewaySslProtocol.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewaySslProtocol.java @@ -8,55 +8,37 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for ApplicationGatewaySslProtocol. */ -public final class ApplicationGatewaySslProtocol { +public final class ApplicationGatewaySslProtocol extends ExpandableStringEnum { /** Static value TLSv1_0 for ApplicationGatewaySslProtocol. */ - public static final ApplicationGatewaySslProtocol TLSV1_0 = new ApplicationGatewaySslProtocol("TLSv1_0"); + public static final ApplicationGatewaySslProtocol TLSV1_0 = fromString("TLSv1_0"); /** Static value TLSv1_1 for ApplicationGatewaySslProtocol. */ - public static final ApplicationGatewaySslProtocol TLSV1_1 = new ApplicationGatewaySslProtocol("TLSv1_1"); + public static final ApplicationGatewaySslProtocol TLSV1_1 = fromString("TLSv1_1"); /** Static value TLSv1_2 for ApplicationGatewaySslProtocol. */ - public static final ApplicationGatewaySslProtocol TLSV1_2 = new ApplicationGatewaySslProtocol("TLSv1_2"); - - private String value; + public static final ApplicationGatewaySslProtocol TLSV1_2 = fromString("TLSv1_2"); /** - * Creates a custom value for ApplicationGatewaySslProtocol. - * @param value the custom value + * Creates or finds a ApplicationGatewaySslProtocol from its string representation. + * @param name a name to look for + * @return the corresponding ApplicationGatewaySslProtocol */ - public ApplicationGatewaySslProtocol(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static ApplicationGatewaySslProtocol fromString(String name) { + return fromString(name, ApplicationGatewaySslProtocol.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof ApplicationGatewaySslProtocol)) { - return false; - } - if (obj == this) { - return true; - } - ApplicationGatewaySslProtocol rhs = (ApplicationGatewaySslProtocol) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known ApplicationGatewaySslProtocol values + */ + public static Collection values() { + return values(ApplicationGatewaySslProtocol.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayTier.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayTier.java index f11e689d3bc..ddff0cc232d 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayTier.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayTier.java @@ -8,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for ApplicationGatewayTier. */ -public final class ApplicationGatewayTier { +public final class ApplicationGatewayTier extends ExpandableStringEnum { /** Static value Standard for ApplicationGatewayTier. */ - public static final ApplicationGatewayTier STANDARD = new ApplicationGatewayTier("Standard"); + public static final ApplicationGatewayTier STANDARD = fromString("Standard"); /** Static value WAF for ApplicationGatewayTier. */ - public static final ApplicationGatewayTier WAF = new ApplicationGatewayTier("WAF"); - - private String value; + public static final ApplicationGatewayTier WAF = fromString("WAF"); /** - * Creates a custom value for ApplicationGatewayTier. - * @param value the custom value + * Creates or finds a ApplicationGatewayTier from its string representation. + * @param name a name to look for + * @return the corresponding ApplicationGatewayTier */ - public ApplicationGatewayTier(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static ApplicationGatewayTier fromString(String name) { + return fromString(name, ApplicationGatewayTier.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof ApplicationGatewayTier)) { - return false; - } - if (obj == this) { - return true; - } - ApplicationGatewayTier rhs = (ApplicationGatewayTier) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known ApplicationGatewayTier values + */ + public static Collection values() { + return values(ApplicationGatewayTier.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayWebApplicationFirewallConfiguration.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayWebApplicationFirewallConfiguration.java index 9507819bcff..504c26306a4 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayWebApplicationFirewallConfiguration.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayWebApplicationFirewallConfiguration.java @@ -48,7 +48,19 @@ public class ApplicationGatewayWebApplicationFirewallConfiguration { private List disabledRuleGroups; /** - * Get the enabled value. + * Whether allow WAF to check request Body. + */ + @JsonProperty(value = "requestBodyCheck") + private Boolean requestBodyCheck; + + /** + * Maxium request body size for WAF. + */ + @JsonProperty(value = "maxRequestBodySize") + private Integer maxRequestBodySize; + + /** + * Get whether the web application firewall is enabled or not. * * @return the enabled value */ @@ -57,7 +69,7 @@ public boolean enabled() { } /** - * Set the enabled value. + * Set whether the web application firewall is enabled or not. * * @param enabled the enabled value to set * @return the ApplicationGatewayWebApplicationFirewallConfiguration object itself. @@ -68,7 +80,7 @@ public ApplicationGatewayWebApplicationFirewallConfiguration withEnabled(boolean } /** - * Get the firewallMode value. + * Get web application firewall mode. Possible values include: 'Detection', 'Prevention'. * * @return the firewallMode value */ @@ -77,7 +89,7 @@ public ApplicationGatewayFirewallMode firewallMode() { } /** - * Set the firewallMode value. + * Set web application firewall mode. Possible values include: 'Detection', 'Prevention'. * * @param firewallMode the firewallMode value to set * @return the ApplicationGatewayWebApplicationFirewallConfiguration object itself. @@ -88,7 +100,7 @@ public ApplicationGatewayWebApplicationFirewallConfiguration withFirewallMode(Ap } /** - * Get the ruleSetType value. + * Get the type of the web application firewall rule set. Possible values are: 'OWASP'. * * @return the ruleSetType value */ @@ -97,7 +109,7 @@ public String ruleSetType() { } /** - * Set the ruleSetType value. + * Set the type of the web application firewall rule set. Possible values are: 'OWASP'. * * @param ruleSetType the ruleSetType value to set * @return the ApplicationGatewayWebApplicationFirewallConfiguration object itself. @@ -108,7 +120,7 @@ public ApplicationGatewayWebApplicationFirewallConfiguration withRuleSetType(Str } /** - * Get the ruleSetVersion value. + * Get the version of the rule set type. * * @return the ruleSetVersion value */ @@ -117,7 +129,7 @@ public String ruleSetVersion() { } /** - * Set the ruleSetVersion value. + * Set the version of the rule set type. * * @param ruleSetVersion the ruleSetVersion value to set * @return the ApplicationGatewayWebApplicationFirewallConfiguration object itself. @@ -128,7 +140,7 @@ public ApplicationGatewayWebApplicationFirewallConfiguration withRuleSetVersion( } /** - * Get the disabledRuleGroups value. + * Get the disabled rule groups. * * @return the disabledRuleGroups value */ @@ -137,7 +149,7 @@ public List disabledRuleGroups() { } /** - * Set the disabledRuleGroups value. + * Set the disabled rule groups. * * @param disabledRuleGroups the disabledRuleGroups value to set * @return the ApplicationGatewayWebApplicationFirewallConfiguration object itself. @@ -147,4 +159,44 @@ public ApplicationGatewayWebApplicationFirewallConfiguration withDisabledRuleGro return this; } + /** + * Get whether allow WAF to check request Body. + * + * @return the requestBodyCheck value + */ + public Boolean requestBodyCheck() { + return this.requestBodyCheck; + } + + /** + * Set whether allow WAF to check request Body. + * + * @param requestBodyCheck the requestBodyCheck value to set + * @return the ApplicationGatewayWebApplicationFirewallConfiguration object itself. + */ + public ApplicationGatewayWebApplicationFirewallConfiguration withRequestBodyCheck(Boolean requestBodyCheck) { + this.requestBodyCheck = requestBodyCheck; + return this; + } + + /** + * Get maxium request body size for WAF. + * + * @return the maxRequestBodySize value + */ + public Integer maxRequestBodySize() { + return this.maxRequestBodySize; + } + + /** + * Set maxium request body size for WAF. + * + * @param maxRequestBodySize the maxRequestBodySize value to set + * @return the ApplicationGatewayWebApplicationFirewallConfiguration object itself. + */ + public ApplicationGatewayWebApplicationFirewallConfiguration withMaxRequestBodySize(Integer maxRequestBodySize) { + this.maxRequestBodySize = maxRequestBodySize; + return this; + } + } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AssociationType.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AssociationType.java index cea87a35c95..3cd3c4845bf 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AssociationType.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AssociationType.java @@ -8,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for AssociationType. */ -public final class AssociationType { +public final class AssociationType extends ExpandableStringEnum { /** Static value Associated for AssociationType. */ - public static final AssociationType ASSOCIATED = new AssociationType("Associated"); + public static final AssociationType ASSOCIATED = fromString("Associated"); /** Static value Contains for AssociationType. */ - public static final AssociationType CONTAINS = new AssociationType("Contains"); - - private String value; + public static final AssociationType CONTAINS = fromString("Contains"); /** - * Creates a custom value for AssociationType. - * @param value the custom value + * Creates or finds a AssociationType from its string representation. + * @param name a name to look for + * @return the corresponding AssociationType */ - public AssociationType(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static AssociationType fromString(String name) { + return fromString(name, AssociationType.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof AssociationType)) { - return false; - } - if (obj == this) { - return true; - } - AssociationType rhs = (AssociationType) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known AssociationType values + */ + public static Collection values() { + return values(AssociationType.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AuthenticationMethod.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AuthenticationMethod.java index 187b50de1bd..2a162792b72 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AuthenticationMethod.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AuthenticationMethod.java @@ -8,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for AuthenticationMethod. */ -public final class AuthenticationMethod { +public final class AuthenticationMethod extends ExpandableStringEnum { /** Static value EAPTLS for AuthenticationMethod. */ - public static final AuthenticationMethod EAPTLS = new AuthenticationMethod("EAPTLS"); + public static final AuthenticationMethod EAPTLS = fromString("EAPTLS"); /** Static value EAPMSCHAPv2 for AuthenticationMethod. */ - public static final AuthenticationMethod EAPMSCHAPV2 = new AuthenticationMethod("EAPMSCHAPv2"); - - private String value; + public static final AuthenticationMethod EAPMSCHAPV2 = fromString("EAPMSCHAPv2"); /** - * Creates a custom value for AuthenticationMethod. - * @param value the custom value + * Creates or finds a AuthenticationMethod from its string representation. + * @param name a name to look for + * @return the corresponding AuthenticationMethod */ - public AuthenticationMethod(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static AuthenticationMethod fromString(String name) { + return fromString(name, AuthenticationMethod.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof AuthenticationMethod)) { - return false; - } - if (obj == this) { - return true; - } - AuthenticationMethod rhs = (AuthenticationMethod) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known AuthenticationMethod values + */ + public static Collection values() { + return values(AuthenticationMethod.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AuthorizationUseStatus.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AuthorizationUseStatus.java index 8b9ace9e7ab..48b19016c22 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AuthorizationUseStatus.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AuthorizationUseStatus.java @@ -8,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for AuthorizationUseStatus. */ -public final class AuthorizationUseStatus { +public final class AuthorizationUseStatus extends ExpandableStringEnum { /** Static value Available for AuthorizationUseStatus. */ - public static final AuthorizationUseStatus AVAILABLE = new AuthorizationUseStatus("Available"); + public static final AuthorizationUseStatus AVAILABLE = fromString("Available"); /** Static value InUse for AuthorizationUseStatus. */ - public static final AuthorizationUseStatus IN_USE = new AuthorizationUseStatus("InUse"); - - private String value; + public static final AuthorizationUseStatus IN_USE = fromString("InUse"); /** - * Creates a custom value for AuthorizationUseStatus. - * @param value the custom value + * Creates or finds a AuthorizationUseStatus from its string representation. + * @param name a name to look for + * @return the corresponding AuthorizationUseStatus */ - public AuthorizationUseStatus(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static AuthorizationUseStatus fromString(String name) { + return fromString(name, AuthorizationUseStatus.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof AuthorizationUseStatus)) { - return false; - } - if (obj == this) { - return true; - } - AuthorizationUseStatus rhs = (AuthorizationUseStatus) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known AuthorizationUseStatus values + */ + public static Collection values() { + return values(AuthorizationUseStatus.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Availability.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Availability.java new file mode 100644 index 00000000000..9ce472b7606 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Availability.java @@ -0,0 +1,95 @@ +/** + * 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.network; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Availability of the metric. + */ +public class Availability { + /** + * The time grain of the availability. + */ + @JsonProperty(value = "timeGrain") + private String timeGrain; + + /** + * The retention of the availability. + */ + @JsonProperty(value = "retention") + private String retention; + + /** + * Duration of the availability blob. + */ + @JsonProperty(value = "blobDuration") + private String blobDuration; + + /** + * Get the time grain of the availability. + * + * @return the timeGrain value + */ + public String timeGrain() { + return this.timeGrain; + } + + /** + * Set the time grain of the availability. + * + * @param timeGrain the timeGrain value to set + * @return the Availability object itself. + */ + public Availability withTimeGrain(String timeGrain) { + this.timeGrain = timeGrain; + return this; + } + + /** + * Get the retention of the availability. + * + * @return the retention value + */ + public String retention() { + return this.retention; + } + + /** + * Set the retention of the availability. + * + * @param retention the retention value to set + * @return the Availability object itself. + */ + public Availability withRetention(String retention) { + this.retention = retention; + return this; + } + + /** + * Get duration of the availability blob. + * + * @return the blobDuration value + */ + public String blobDuration() { + return this.blobDuration; + } + + /** + * Set duration of the availability blob. + * + * @param blobDuration the blobDuration value to set + * @return the Availability object itself. + */ + public Availability withBlobDuration(String blobDuration) { + this.blobDuration = blobDuration; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AvailableProvidersListCity.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AvailableProvidersListCity.java new file mode 100644 index 00000000000..ef6fc28e9a3 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AvailableProvidersListCity.java @@ -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.network; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * City or town details. + */ +public class AvailableProvidersListCity { + /** + * The city or town name. + */ + @JsonProperty(value = "cityName") + private String cityName; + + /** + * A list of Internet service providers. + */ + @JsonProperty(value = "providers") + private List providers; + + /** + * Get the city or town name. + * + * @return the cityName value + */ + public String cityName() { + return this.cityName; + } + + /** + * Set the city or town name. + * + * @param cityName the cityName value to set + * @return the AvailableProvidersListCity object itself. + */ + public AvailableProvidersListCity withCityName(String cityName) { + this.cityName = cityName; + return this; + } + + /** + * Get a list of Internet service providers. + * + * @return the providers value + */ + public List providers() { + return this.providers; + } + + /** + * Set a list of Internet service providers. + * + * @param providers the providers value to set + * @return the AvailableProvidersListCity object itself. + */ + public AvailableProvidersListCity withProviders(List providers) { + this.providers = providers; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AvailableProvidersListCountry.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AvailableProvidersListCountry.java new file mode 100644 index 00000000000..d336a8c0dda --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AvailableProvidersListCountry.java @@ -0,0 +1,96 @@ +/** + * 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.network; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Country details. + */ +public class AvailableProvidersListCountry { + /** + * The country name. + */ + @JsonProperty(value = "countryName") + private String countryName; + + /** + * A list of Internet service providers. + */ + @JsonProperty(value = "providers") + private List providers; + + /** + * List of available states in the country. + */ + @JsonProperty(value = "states") + private List states; + + /** + * Get the country name. + * + * @return the countryName value + */ + public String countryName() { + return this.countryName; + } + + /** + * Set the country name. + * + * @param countryName the countryName value to set + * @return the AvailableProvidersListCountry object itself. + */ + public AvailableProvidersListCountry withCountryName(String countryName) { + this.countryName = countryName; + return this; + } + + /** + * Get a list of Internet service providers. + * + * @return the providers value + */ + public List providers() { + return this.providers; + } + + /** + * Set a list of Internet service providers. + * + * @param providers the providers value to set + * @return the AvailableProvidersListCountry object itself. + */ + public AvailableProvidersListCountry withProviders(List providers) { + this.providers = providers; + return this; + } + + /** + * Get list of available states in the country. + * + * @return the states value + */ + public List states() { + return this.states; + } + + /** + * Set list of available states in the country. + * + * @param states the states value to set + * @return the AvailableProvidersListCountry object itself. + */ + public AvailableProvidersListCountry withStates(List states) { + this.states = states; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AvailableProvidersListParameters.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AvailableProvidersListParameters.java new file mode 100644 index 00000000000..29a9546bd2c --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AvailableProvidersListParameters.java @@ -0,0 +1,122 @@ +/** + * 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.network; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Constraints that determine the list of available Internet service providers. + */ +public class AvailableProvidersListParameters { + /** + * A list of Azure regions. + */ + @JsonProperty(value = "azureLocations") + private List azureLocations; + + /** + * The country for available providers list. + */ + @JsonProperty(value = "country") + private String country; + + /** + * The state for available providers list. + */ + @JsonProperty(value = "state") + private String state; + + /** + * The city or town for available providers list. + */ + @JsonProperty(value = "city") + private String city; + + /** + * Get a list of Azure regions. + * + * @return the azureLocations value + */ + public List azureLocations() { + return this.azureLocations; + } + + /** + * Set a list of Azure regions. + * + * @param azureLocations the azureLocations value to set + * @return the AvailableProvidersListParameters object itself. + */ + public AvailableProvidersListParameters withAzureLocations(List azureLocations) { + this.azureLocations = azureLocations; + return this; + } + + /** + * Get the country for available providers list. + * + * @return the country value + */ + public String country() { + return this.country; + } + + /** + * Set the country for available providers list. + * + * @param country the country value to set + * @return the AvailableProvidersListParameters object itself. + */ + public AvailableProvidersListParameters withCountry(String country) { + this.country = country; + return this; + } + + /** + * Get the state for available providers list. + * + * @return the state value + */ + public String state() { + return this.state; + } + + /** + * Set the state for available providers list. + * + * @param state the state value to set + * @return the AvailableProvidersListParameters object itself. + */ + public AvailableProvidersListParameters withState(String state) { + this.state = state; + return this; + } + + /** + * Get the city or town for available providers list. + * + * @return the city value + */ + public String city() { + return this.city; + } + + /** + * Set the city or town for available providers list. + * + * @param city the city value to set + * @return the AvailableProvidersListParameters object itself. + */ + public AvailableProvidersListParameters withCity(String city) { + this.city = city; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AvailableProvidersListState.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AvailableProvidersListState.java new file mode 100644 index 00000000000..b7cc1151d92 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AvailableProvidersListState.java @@ -0,0 +1,96 @@ +/** + * 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.network; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * State details. + */ +public class AvailableProvidersListState { + /** + * The state name. + */ + @JsonProperty(value = "stateName") + private String stateName; + + /** + * A list of Internet service providers. + */ + @JsonProperty(value = "providers") + private List providers; + + /** + * List of available cities or towns in the state. + */ + @JsonProperty(value = "cities") + private List cities; + + /** + * Get the state name. + * + * @return the stateName value + */ + public String stateName() { + return this.stateName; + } + + /** + * Set the state name. + * + * @param stateName the stateName value to set + * @return the AvailableProvidersListState object itself. + */ + public AvailableProvidersListState withStateName(String stateName) { + this.stateName = stateName; + return this; + } + + /** + * Get a list of Internet service providers. + * + * @return the providers value + */ + public List providers() { + return this.providers; + } + + /** + * Set a list of Internet service providers. + * + * @param providers the providers value to set + * @return the AvailableProvidersListState object itself. + */ + public AvailableProvidersListState withProviders(List providers) { + this.providers = providers; + return this; + } + + /** + * Get list of available cities or towns in the state. + * + * @return the cities value + */ + public List cities() { + return this.cities; + } + + /** + * Set list of available cities or towns in the state. + * + * @param cities the cities value to set + * @return the AvailableProvidersListState object itself. + */ + public AvailableProvidersListState withCities(List cities) { + this.cities = cities; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AzureAsyncOperationResult.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AzureAsyncOperationResult.java index 3ee2cfed6a8..483d1254ee0 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AzureAsyncOperationResult.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AzureAsyncOperationResult.java @@ -36,7 +36,7 @@ public class AzureAsyncOperationResult { private Error error; /** - * Get the status value. + * Get status of the Azure async operation. Possible values are: 'InProgress', 'Succeeded', and 'Failed'. Possible values include: 'InProgress', 'Succeeded', 'Failed'. * * @return the status value */ @@ -45,7 +45,7 @@ public NetworkOperationStatus status() { } /** - * Set the status value. + * Set status of the Azure async operation. Possible values are: 'InProgress', 'Succeeded', and 'Failed'. Possible values include: 'InProgress', 'Succeeded', 'Failed'. * * @param status the status value to set * @return the AzureAsyncOperationResult object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AzureReachabilityReportItem.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AzureReachabilityReportItem.java new file mode 100644 index 00000000000..e5be4d158c0 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AzureReachabilityReportItem.java @@ -0,0 +1,96 @@ +/** + * 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.network; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Azure reachability report details for a given provider location. + */ +public class AzureReachabilityReportItem { + /** + * The Internet service provider. + */ + @JsonProperty(value = "provider") + private String provider; + + /** + * The Azure region. + */ + @JsonProperty(value = "azureLocation") + private String azureLocation; + + /** + * List of latency details for each of the time series. + */ + @JsonProperty(value = "latencies") + private List latencies; + + /** + * Get the Internet service provider. + * + * @return the provider value + */ + public String provider() { + return this.provider; + } + + /** + * Set the Internet service provider. + * + * @param provider the provider value to set + * @return the AzureReachabilityReportItem object itself. + */ + public AzureReachabilityReportItem withProvider(String provider) { + this.provider = provider; + return this; + } + + /** + * Get the Azure region. + * + * @return the azureLocation value + */ + public String azureLocation() { + return this.azureLocation; + } + + /** + * Set the Azure region. + * + * @param azureLocation the azureLocation value to set + * @return the AzureReachabilityReportItem object itself. + */ + public AzureReachabilityReportItem withAzureLocation(String azureLocation) { + this.azureLocation = azureLocation; + return this; + } + + /** + * Get list of latency details for each of the time series. + * + * @return the latencies value + */ + public List latencies() { + return this.latencies; + } + + /** + * Set list of latency details for each of the time series. + * + * @param latencies the latencies value to set + * @return the AzureReachabilityReportItem object itself. + */ + public AzureReachabilityReportItem withLatencies(List latencies) { + this.latencies = latencies; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AzureReachabilityReportLatencyInfo.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AzureReachabilityReportLatencyInfo.java new file mode 100644 index 00000000000..e774a9fcd67 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AzureReachabilityReportLatencyInfo.java @@ -0,0 +1,71 @@ +/** + * 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.network; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Details on latency for a time series. + */ +public class AzureReachabilityReportLatencyInfo { + /** + * The time stamp. + */ + @JsonProperty(value = "timeStamp") + private DateTime timeStamp; + + /** + * The relative latency score between 1 and 100, higher values indicating a + * faster connection. + */ + @JsonProperty(value = "score") + private Integer score; + + /** + * Get the time stamp. + * + * @return the timeStamp value + */ + public DateTime timeStamp() { + return this.timeStamp; + } + + /** + * Set the time stamp. + * + * @param timeStamp the timeStamp value to set + * @return the AzureReachabilityReportLatencyInfo object itself. + */ + public AzureReachabilityReportLatencyInfo withTimeStamp(DateTime timeStamp) { + this.timeStamp = timeStamp; + return this; + } + + /** + * Get the relative latency score between 1 and 100, higher values indicating a faster connection. + * + * @return the score value + */ + public Integer score() { + return this.score; + } + + /** + * Set the relative latency score between 1 and 100, higher values indicating a faster connection. + * + * @param score the score value to set + * @return the AzureReachabilityReportLatencyInfo object itself. + */ + public AzureReachabilityReportLatencyInfo withScore(Integer score) { + this.score = score; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AzureReachabilityReportLocation.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AzureReachabilityReportLocation.java new file mode 100644 index 00000000000..07e0907fcec --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AzureReachabilityReportLocation.java @@ -0,0 +1,95 @@ +/** + * 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.network; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameters that define a geographic location. + */ +public class AzureReachabilityReportLocation { + /** + * The name of the country. + */ + @JsonProperty(value = "country", required = true) + private String country; + + /** + * The name of the state. + */ + @JsonProperty(value = "state") + private String state; + + /** + * The name of the city or town. + */ + @JsonProperty(value = "city") + private String city; + + /** + * Get the name of the country. + * + * @return the country value + */ + public String country() { + return this.country; + } + + /** + * Set the name of the country. + * + * @param country the country value to set + * @return the AzureReachabilityReportLocation object itself. + */ + public AzureReachabilityReportLocation withCountry(String country) { + this.country = country; + return this; + } + + /** + * Get the name of the state. + * + * @return the state value + */ + public String state() { + return this.state; + } + + /** + * Set the name of the state. + * + * @param state the state value to set + * @return the AzureReachabilityReportLocation object itself. + */ + public AzureReachabilityReportLocation withState(String state) { + this.state = state; + return this; + } + + /** + * Get the name of the city or town. + * + * @return the city value + */ + public String city() { + return this.city; + } + + /** + * Set the name of the city or town. + * + * @param city the city value to set + * @return the AzureReachabilityReportLocation object itself. + */ + public AzureReachabilityReportLocation withCity(String city) { + this.city = city; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AzureReachabilityReportParameters.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AzureReachabilityReportParameters.java new file mode 100644 index 00000000000..7de16b7a1ca --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AzureReachabilityReportParameters.java @@ -0,0 +1,149 @@ +/** + * 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.network; + +import java.util.List; +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Geographic and time constraints for Azure reachability report. + */ +public class AzureReachabilityReportParameters { + /** + * The providerLocation property. + */ + @JsonProperty(value = "providerLocation", required = true) + private AzureReachabilityReportLocation providerLocation; + + /** + * List of Internet service providers. + */ + @JsonProperty(value = "providers") + private List providers; + + /** + * Optional Azure regions to scope the query to. + */ + @JsonProperty(value = "azureLocations") + private List azureLocations; + + /** + * The start time for the Azure reachability report. + */ + @JsonProperty(value = "startTime", required = true) + private DateTime startTime; + + /** + * The end time for the Azure reachability report. + */ + @JsonProperty(value = "endTime", required = true) + private DateTime endTime; + + /** + * Get the providerLocation value. + * + * @return the providerLocation value + */ + public AzureReachabilityReportLocation providerLocation() { + return this.providerLocation; + } + + /** + * Set the providerLocation value. + * + * @param providerLocation the providerLocation value to set + * @return the AzureReachabilityReportParameters object itself. + */ + public AzureReachabilityReportParameters withProviderLocation(AzureReachabilityReportLocation providerLocation) { + this.providerLocation = providerLocation; + return this; + } + + /** + * Get list of Internet service providers. + * + * @return the providers value + */ + public List providers() { + return this.providers; + } + + /** + * Set list of Internet service providers. + * + * @param providers the providers value to set + * @return the AzureReachabilityReportParameters object itself. + */ + public AzureReachabilityReportParameters withProviders(List providers) { + this.providers = providers; + return this; + } + + /** + * Get optional Azure regions to scope the query to. + * + * @return the azureLocations value + */ + public List azureLocations() { + return this.azureLocations; + } + + /** + * Set optional Azure regions to scope the query to. + * + * @param azureLocations the azureLocations value to set + * @return the AzureReachabilityReportParameters object itself. + */ + public AzureReachabilityReportParameters withAzureLocations(List azureLocations) { + this.azureLocations = azureLocations; + return this; + } + + /** + * Get the start time for the Azure reachability report. + * + * @return the startTime value + */ + public DateTime startTime() { + return this.startTime; + } + + /** + * Set the start time for the Azure reachability report. + * + * @param startTime the startTime value to set + * @return the AzureReachabilityReportParameters object itself. + */ + public AzureReachabilityReportParameters withStartTime(DateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the end time for the Azure reachability report. + * + * @return the endTime value + */ + public DateTime endTime() { + return this.endTime; + } + + /** + * Set the end time for the Azure reachability report. + * + * @param endTime the endTime value to set + * @return the AzureReachabilityReportParameters object itself. + */ + public AzureReachabilityReportParameters withEndTime(DateTime endTime) { + this.endTime = endTime; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/BGPCommunity.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/BGPCommunity.java index 0124f01d91c..94ad89df188 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/BGPCommunity.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/BGPCommunity.java @@ -53,7 +53,7 @@ public class BGPCommunity { private String serviceGroup; /** - * Get the serviceSupportedRegion value. + * Get the region which the service support. e.g. For O365, region is Global. * * @return the serviceSupportedRegion value */ @@ -62,7 +62,7 @@ public String serviceSupportedRegion() { } /** - * Set the serviceSupportedRegion value. + * Set the region which the service support. e.g. For O365, region is Global. * * @param serviceSupportedRegion the serviceSupportedRegion value to set * @return the BGPCommunity object itself. @@ -73,7 +73,7 @@ public BGPCommunity withServiceSupportedRegion(String serviceSupportedRegion) { } /** - * Get the communityName value. + * Get the name of the bgp community. e.g. Skype. * * @return the communityName value */ @@ -82,7 +82,7 @@ public String communityName() { } /** - * Set the communityName value. + * Set the name of the bgp community. e.g. Skype. * * @param communityName the communityName value to set * @return the BGPCommunity object itself. @@ -93,7 +93,7 @@ public BGPCommunity withCommunityName(String communityName) { } /** - * Get the communityValue value. + * Get the value of the bgp community. For more information: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing. * * @return the communityValue value */ @@ -102,7 +102,7 @@ public String communityValue() { } /** - * Set the communityValue value. + * Set the value of the bgp community. For more information: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing. * * @param communityValue the communityValue value to set * @return the BGPCommunity object itself. @@ -113,7 +113,7 @@ public BGPCommunity withCommunityValue(String communityValue) { } /** - * Get the communityPrefixes value. + * Get the prefixes that the bgp community contains. * * @return the communityPrefixes value */ @@ -122,7 +122,7 @@ public List communityPrefixes() { } /** - * Set the communityPrefixes value. + * Set the prefixes that the bgp community contains. * * @param communityPrefixes the communityPrefixes value to set * @return the BGPCommunity object itself. @@ -133,7 +133,7 @@ public BGPCommunity withCommunityPrefixes(List communityPrefixes) { } /** - * Get the isAuthorizedToUse value. + * Get customer is authorized to use bgp community or not. * * @return the isAuthorizedToUse value */ @@ -142,7 +142,7 @@ public Boolean isAuthorizedToUse() { } /** - * Set the isAuthorizedToUse value. + * Set customer is authorized to use bgp community or not. * * @param isAuthorizedToUse the isAuthorizedToUse value to set * @return the BGPCommunity object itself. @@ -153,7 +153,7 @@ public BGPCommunity withIsAuthorizedToUse(Boolean isAuthorizedToUse) { } /** - * Get the serviceGroup value. + * Get the service group of the bgp community contains. * * @return the serviceGroup value */ @@ -162,7 +162,7 @@ public String serviceGroup() { } /** - * Set the serviceGroup value. + * Set the service group of the bgp community contains. * * @param serviceGroup the serviceGroup value to set * @return the BGPCommunity object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/BgpPeerState.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/BgpPeerState.java index 2df82519ae0..c11111cfb08 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/BgpPeerState.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/BgpPeerState.java @@ -8,61 +8,43 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for BgpPeerState. */ -public final class BgpPeerState { +public final class BgpPeerState extends ExpandableStringEnum { /** Static value Unknown for BgpPeerState. */ - public static final BgpPeerState UNKNOWN = new BgpPeerState("Unknown"); + public static final BgpPeerState UNKNOWN = fromString("Unknown"); /** Static value Stopped for BgpPeerState. */ - public static final BgpPeerState STOPPED = new BgpPeerState("Stopped"); + public static final BgpPeerState STOPPED = fromString("Stopped"); /** Static value Idle for BgpPeerState. */ - public static final BgpPeerState IDLE = new BgpPeerState("Idle"); + public static final BgpPeerState IDLE = fromString("Idle"); /** Static value Connecting for BgpPeerState. */ - public static final BgpPeerState CONNECTING = new BgpPeerState("Connecting"); + public static final BgpPeerState CONNECTING = fromString("Connecting"); /** Static value Connected for BgpPeerState. */ - public static final BgpPeerState CONNECTED = new BgpPeerState("Connected"); - - private String value; + public static final BgpPeerState CONNECTED = fromString("Connected"); /** - * Creates a custom value for BgpPeerState. - * @param value the custom value + * Creates or finds a BgpPeerState from its string representation. + * @param name a name to look for + * @return the corresponding BgpPeerState */ - public BgpPeerState(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static BgpPeerState fromString(String name) { + return fromString(name, BgpPeerState.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof BgpPeerState)) { - return false; - } - if (obj == this) { - return true; - } - BgpPeerState rhs = (BgpPeerState) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known BgpPeerState values + */ + public static Collection values() { + return values(BgpPeerState.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/BgpPeerStatus.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/BgpPeerStatus.java index 85d9dc73eec..46f5954dd01 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/BgpPeerStatus.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/BgpPeerStatus.java @@ -64,7 +64,7 @@ public class BgpPeerStatus { private Long messagesReceived; /** - * Get the localAddress value. + * Get the virtual network gateway's local address. * * @return the localAddress value */ @@ -73,7 +73,7 @@ public String localAddress() { } /** - * Get the neighbor value. + * Get the remote BGP peer. * * @return the neighbor value */ @@ -82,7 +82,7 @@ public String neighbor() { } /** - * Get the asn value. + * Get the autonomous system number of the remote BGP peer. * * @return the asn value */ @@ -91,7 +91,7 @@ public Integer asn() { } /** - * Get the state value. + * Get the BGP peer state. Possible values include: 'Unknown', 'Stopped', 'Idle', 'Connecting', 'Connected'. * * @return the state value */ @@ -100,7 +100,7 @@ public BgpPeerState state() { } /** - * Get the connectedDuration value. + * Get for how long the peering has been up. * * @return the connectedDuration value */ @@ -109,7 +109,7 @@ public String connectedDuration() { } /** - * Get the routesReceived value. + * Get the number of routes learned from this peer. * * @return the routesReceived value */ @@ -118,7 +118,7 @@ public Long routesReceived() { } /** - * Get the messagesSent value. + * Get the number of BGP messages sent. * * @return the messagesSent value */ @@ -127,7 +127,7 @@ public Long messagesSent() { } /** - * Get the messagesReceived value. + * Get the number of BGP messages received. * * @return the messagesReceived value */ diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/BgpSettings.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/BgpSettings.java index 998f17f9dd2..c3cd11d9583 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/BgpSettings.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/BgpSettings.java @@ -33,7 +33,7 @@ public class BgpSettings { private Integer peerWeight; /** - * Get the asn value. + * Get the BGP speaker's ASN. * * @return the asn value */ @@ -42,7 +42,7 @@ public Long asn() { } /** - * Set the asn value. + * Set the BGP speaker's ASN. * * @param asn the asn value to set * @return the BgpSettings object itself. @@ -53,7 +53,7 @@ public BgpSettings withAsn(Long asn) { } /** - * Get the bgpPeeringAddress value. + * Get the BGP peering address and BGP identifier of this BGP speaker. * * @return the bgpPeeringAddress value */ @@ -62,7 +62,7 @@ public String bgpPeeringAddress() { } /** - * Set the bgpPeeringAddress value. + * Set the BGP peering address and BGP identifier of this BGP speaker. * * @param bgpPeeringAddress the bgpPeeringAddress value to set * @return the BgpSettings object itself. @@ -73,7 +73,7 @@ public BgpSettings withBgpPeeringAddress(String bgpPeeringAddress) { } /** - * Get the peerWeight value. + * Get the weight added to routes learned from this BGP speaker. * * @return the peerWeight value */ @@ -82,7 +82,7 @@ public Integer peerWeight() { } /** - * Set the peerWeight value. + * Set the weight added to routes learned from this BGP speaker. * * @param peerWeight the peerWeight value to set * @return the BgpSettings object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/CircuitConnectionStatus.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/CircuitConnectionStatus.java new file mode 100644 index 00000000000..8a9945553d6 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/CircuitConnectionStatus.java @@ -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.network; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for CircuitConnectionStatus. + */ +public final class CircuitConnectionStatus extends ExpandableStringEnum { + /** Static value Connected for CircuitConnectionStatus. */ + public static final CircuitConnectionStatus CONNECTED = fromString("Connected"); + + /** Static value Connecting for CircuitConnectionStatus. */ + public static final CircuitConnectionStatus CONNECTING = fromString("Connecting"); + + /** Static value Disconnected for CircuitConnectionStatus. */ + public static final CircuitConnectionStatus DISCONNECTED = fromString("Disconnected"); + + /** + * Creates or finds a CircuitConnectionStatus from its string representation. + * @param name a name to look for + * @return the corresponding CircuitConnectionStatus + */ + @JsonCreator + public static CircuitConnectionStatus fromString(String name) { + return fromString(name, CircuitConnectionStatus.class); + } + + /** + * @return known CircuitConnectionStatus values + */ + public static Collection values() { + return values(CircuitConnectionStatus.class); + } +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionMonitorDestination.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionMonitorDestination.java new file mode 100644 index 00000000000..3555242f922 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionMonitorDestination.java @@ -0,0 +1,95 @@ +/** + * 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.network; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes the destination of connection monitor. + */ +public class ConnectionMonitorDestination { + /** + * The ID of the resource used as the destination by connection monitor. + */ + @JsonProperty(value = "resourceId") + private String resourceId; + + /** + * Address of the connection monitor destination (IP or domain name). + */ + @JsonProperty(value = "address") + private String address; + + /** + * The destination port used by connection monitor. + */ + @JsonProperty(value = "port") + private Integer port; + + /** + * Get the ID of the resource used as the destination by connection monitor. + * + * @return the resourceId value + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the ID of the resource used as the destination by connection monitor. + * + * @param resourceId the resourceId value to set + * @return the ConnectionMonitorDestination object itself. + */ + public ConnectionMonitorDestination withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Get address of the connection monitor destination (IP or domain name). + * + * @return the address value + */ + public String address() { + return this.address; + } + + /** + * Set address of the connection monitor destination (IP or domain name). + * + * @param address the address value to set + * @return the ConnectionMonitorDestination object itself. + */ + public ConnectionMonitorDestination withAddress(String address) { + this.address = address; + return this; + } + + /** + * Get the destination port used by connection monitor. + * + * @return the port value + */ + public Integer port() { + return this.port; + } + + /** + * Set the destination port used by connection monitor. + * + * @param port the port value to set + * @return the ConnectionMonitorDestination object itself. + */ + public ConnectionMonitorDestination withPort(Integer port) { + this.port = port; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionMonitorParameters.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionMonitorParameters.java new file mode 100644 index 00000000000..caade1050d9 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionMonitorParameters.java @@ -0,0 +1,122 @@ +/** + * 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.network; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameters that define the operation to create a connection monitor. + */ +public class ConnectionMonitorParameters { + /** + * The source property. + */ + @JsonProperty(value = "source", required = true) + private ConnectionMonitorSource source; + + /** + * The destination property. + */ + @JsonProperty(value = "destination", required = true) + private ConnectionMonitorDestination destination; + + /** + * Determines if the connection monitor will start automatically once + * created. + */ + @JsonProperty(value = "autoStart") + private Boolean autoStart; + + /** + * Monitoring interval in seconds. + */ + @JsonProperty(value = "monitoringIntervalInSeconds") + private Integer monitoringIntervalInSeconds; + + /** + * Get the source value. + * + * @return the source value + */ + public ConnectionMonitorSource source() { + return this.source; + } + + /** + * Set the source value. + * + * @param source the source value to set + * @return the ConnectionMonitorParameters object itself. + */ + public ConnectionMonitorParameters withSource(ConnectionMonitorSource source) { + this.source = source; + return this; + } + + /** + * Get the destination value. + * + * @return the destination value + */ + public ConnectionMonitorDestination destination() { + return this.destination; + } + + /** + * Set the destination value. + * + * @param destination the destination value to set + * @return the ConnectionMonitorParameters object itself. + */ + public ConnectionMonitorParameters withDestination(ConnectionMonitorDestination destination) { + this.destination = destination; + return this; + } + + /** + * Get determines if the connection monitor will start automatically once created. + * + * @return the autoStart value + */ + public Boolean autoStart() { + return this.autoStart; + } + + /** + * Set determines if the connection monitor will start automatically once created. + * + * @param autoStart the autoStart value to set + * @return the ConnectionMonitorParameters object itself. + */ + public ConnectionMonitorParameters withAutoStart(Boolean autoStart) { + this.autoStart = autoStart; + return this; + } + + /** + * Get monitoring interval in seconds. + * + * @return the monitoringIntervalInSeconds value + */ + public Integer monitoringIntervalInSeconds() { + return this.monitoringIntervalInSeconds; + } + + /** + * Set monitoring interval in seconds. + * + * @param monitoringIntervalInSeconds the monitoringIntervalInSeconds value to set + * @return the ConnectionMonitorParameters object itself. + */ + public ConnectionMonitorParameters withMonitoringIntervalInSeconds(Integer monitoringIntervalInSeconds) { + this.monitoringIntervalInSeconds = monitoringIntervalInSeconds; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionMonitorSource.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionMonitorSource.java new file mode 100644 index 00000000000..a3a2fb24abe --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionMonitorSource.java @@ -0,0 +1,69 @@ +/** + * 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.network; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes the source of connection monitor. + */ +public class ConnectionMonitorSource { + /** + * The ID of the resource used as the source by connection monitor. + */ + @JsonProperty(value = "resourceId", required = true) + private String resourceId; + + /** + * The source port used by connection monitor. + */ + @JsonProperty(value = "port") + private Integer port; + + /** + * Get the ID of the resource used as the source by connection monitor. + * + * @return the resourceId value + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the ID of the resource used as the source by connection monitor. + * + * @param resourceId the resourceId value to set + * @return the ConnectionMonitorSource object itself. + */ + public ConnectionMonitorSource withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Get the source port used by connection monitor. + * + * @return the port value + */ + public Integer port() { + return this.port; + } + + /** + * Set the source port used by connection monitor. + * + * @param port the port value to set + * @return the ConnectionMonitorSource object itself. + */ + public ConnectionMonitorSource withPort(Integer port) { + this.port = port; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionMonitorSourceStatus.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionMonitorSourceStatus.java new file mode 100644 index 00000000000..4dffb239721 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionMonitorSourceStatus.java @@ -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.network; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ConnectionMonitorSourceStatus. + */ +public final class ConnectionMonitorSourceStatus extends ExpandableStringEnum { + /** Static value Uknown for ConnectionMonitorSourceStatus. */ + public static final ConnectionMonitorSourceStatus UKNOWN = fromString("Uknown"); + + /** Static value Active for ConnectionMonitorSourceStatus. */ + public static final ConnectionMonitorSourceStatus ACTIVE = fromString("Active"); + + /** Static value Inactive for ConnectionMonitorSourceStatus. */ + public static final ConnectionMonitorSourceStatus INACTIVE = fromString("Inactive"); + + /** + * Creates or finds a ConnectionMonitorSourceStatus from its string representation. + * @param name a name to look for + * @return the corresponding ConnectionMonitorSourceStatus + */ + @JsonCreator + public static ConnectionMonitorSourceStatus fromString(String name) { + return fromString(name, ConnectionMonitorSourceStatus.class); + } + + /** + * @return known ConnectionMonitorSourceStatus values + */ + public static Collection values() { + return values(ConnectionMonitorSourceStatus.class); + } +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionState.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionState.java new file mode 100644 index 00000000000..b6f2352dda5 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionState.java @@ -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.network; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ConnectionState. + */ +public final class ConnectionState extends ExpandableStringEnum { + /** Static value Reachable for ConnectionState. */ + public static final ConnectionState REACHABLE = fromString("Reachable"); + + /** Static value Unreachable for ConnectionState. */ + public static final ConnectionState UNREACHABLE = fromString("Unreachable"); + + /** Static value Unknown for ConnectionState. */ + public static final ConnectionState UNKNOWN = fromString("Unknown"); + + /** + * Creates or finds a ConnectionState from its string representation. + * @param name a name to look for + * @return the corresponding ConnectionState + */ + @JsonCreator + public static ConnectionState fromString(String name) { + return fromString(name, ConnectionState.class); + } + + /** + * @return known ConnectionState values + */ + public static Collection values() { + return values(ConnectionState.class); + } +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionStateSnapshot.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionStateSnapshot.java new file mode 100644 index 00000000000..986a3b30715 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionStateSnapshot.java @@ -0,0 +1,140 @@ +/** + * 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.network; + +import org.joda.time.DateTime; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Connection state snapshot. + */ +public class ConnectionStateSnapshot { + /** + * The connection state. Possible values include: 'Reachable', + * 'Unreachable', 'Unknown'. + */ + @JsonProperty(value = "connectionState") + private ConnectionState connectionState; + + /** + * The start time of the connection snapshot. + */ + @JsonProperty(value = "startTime") + private DateTime startTime; + + /** + * The end time of the connection snapshot. + */ + @JsonProperty(value = "endTime") + private DateTime endTime; + + /** + * Connectivity analysis evaluation state. Possible values include: + * 'NotStarted', 'InProgress', 'Completed'. + */ + @JsonProperty(value = "evaluationState") + private EvaluationState evaluationState; + + /** + * List of hops between the source and the destination. + */ + @JsonProperty(value = "hops", access = JsonProperty.Access.WRITE_ONLY) + private List hops; + + /** + * Get the connection state. Possible values include: 'Reachable', 'Unreachable', 'Unknown'. + * + * @return the connectionState value + */ + public ConnectionState connectionState() { + return this.connectionState; + } + + /** + * Set the connection state. Possible values include: 'Reachable', 'Unreachable', 'Unknown'. + * + * @param connectionState the connectionState value to set + * @return the ConnectionStateSnapshot object itself. + */ + public ConnectionStateSnapshot withConnectionState(ConnectionState connectionState) { + this.connectionState = connectionState; + return this; + } + + /** + * Get the start time of the connection snapshot. + * + * @return the startTime value + */ + public DateTime startTime() { + return this.startTime; + } + + /** + * Set the start time of the connection snapshot. + * + * @param startTime the startTime value to set + * @return the ConnectionStateSnapshot object itself. + */ + public ConnectionStateSnapshot withStartTime(DateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the end time of the connection snapshot. + * + * @return the endTime value + */ + public DateTime endTime() { + return this.endTime; + } + + /** + * Set the end time of the connection snapshot. + * + * @param endTime the endTime value to set + * @return the ConnectionStateSnapshot object itself. + */ + public ConnectionStateSnapshot withEndTime(DateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get connectivity analysis evaluation state. Possible values include: 'NotStarted', 'InProgress', 'Completed'. + * + * @return the evaluationState value + */ + public EvaluationState evaluationState() { + return this.evaluationState; + } + + /** + * Set connectivity analysis evaluation state. Possible values include: 'NotStarted', 'InProgress', 'Completed'. + * + * @param evaluationState the evaluationState value to set + * @return the ConnectionStateSnapshot object itself. + */ + public ConnectionStateSnapshot withEvaluationState(EvaluationState evaluationState) { + this.evaluationState = evaluationState; + return this; + } + + /** + * Get list of hops between the source and the destination. + * + * @return the hops value + */ + public List hops() { + return this.hops; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionStatus.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionStatus.java index 753ffeaf59e..c9b018887be 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionStatus.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionStatus.java @@ -8,58 +8,40 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for ConnectionStatus. */ -public final class ConnectionStatus { +public final class ConnectionStatus extends ExpandableStringEnum { /** Static value Unknown for ConnectionStatus. */ - public static final ConnectionStatus UNKNOWN = new ConnectionStatus("Unknown"); + public static final ConnectionStatus UNKNOWN = fromString("Unknown"); /** Static value Connected for ConnectionStatus. */ - public static final ConnectionStatus CONNECTED = new ConnectionStatus("Connected"); + public static final ConnectionStatus CONNECTED = fromString("Connected"); /** Static value Disconnected for ConnectionStatus. */ - public static final ConnectionStatus DISCONNECTED = new ConnectionStatus("Disconnected"); + public static final ConnectionStatus DISCONNECTED = fromString("Disconnected"); /** Static value Degraded for ConnectionStatus. */ - public static final ConnectionStatus DEGRADED = new ConnectionStatus("Degraded"); - - private String value; + public static final ConnectionStatus DEGRADED = fromString("Degraded"); /** - * Creates a custom value for ConnectionStatus. - * @param value the custom value + * Creates or finds a ConnectionStatus from its string representation. + * @param name a name to look for + * @return the corresponding ConnectionStatus */ - public ConnectionStatus(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static ConnectionStatus fromString(String name) { + return fromString(name, ConnectionStatus.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof ConnectionStatus)) { - return false; - } - if (obj == this) { - return true; - } - ConnectionStatus rhs = (ConnectionStatus) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known ConnectionStatus values + */ + public static Collection values() { + return values(ConnectionStatus.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectivityDestination.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectivityDestination.java index 085b7ae9f61..7384023d8aa 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectivityDestination.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectivityDestination.java @@ -34,7 +34,7 @@ public class ConnectivityDestination { private Integer port; /** - * Get the resourceId value. + * Get the ID of the resource to which a connection attempt will be made. * * @return the resourceId value */ @@ -43,7 +43,7 @@ public String resourceId() { } /** - * Set the resourceId value. + * Set the ID of the resource to which a connection attempt will be made. * * @param resourceId the resourceId value to set * @return the ConnectivityDestination object itself. @@ -54,7 +54,7 @@ public ConnectivityDestination withResourceId(String resourceId) { } /** - * Get the address value. + * Get the IP address or URI the resource to which a connection attempt will be made. * * @return the address value */ @@ -63,7 +63,7 @@ public String address() { } /** - * Set the address value. + * Set the IP address or URI the resource to which a connection attempt will be made. * * @param address the address value to set * @return the ConnectivityDestination object itself. @@ -74,7 +74,7 @@ public ConnectivityDestination withAddress(String address) { } /** - * Get the port value. + * Get port on which check connectivity will be performed. * * @return the port value */ @@ -83,7 +83,7 @@ public Integer port() { } /** - * Set the port value. + * Set port on which check connectivity will be performed. * * @param port the port value to set * @return the ConnectivityDestination object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectivityHop.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectivityHop.java index 9103e1faca1..4bb72b00667 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectivityHop.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectivityHop.java @@ -52,7 +52,7 @@ public class ConnectivityHop { private List issues; /** - * Get the type value. + * Get the type of the hop. * * @return the type value */ @@ -61,7 +61,7 @@ public String type() { } /** - * Get the id value. + * Get the ID of the hop. * * @return the id value */ @@ -70,7 +70,7 @@ public String id() { } /** - * Get the address value. + * Get the IP address of the hop. * * @return the address value */ @@ -79,7 +79,7 @@ public String address() { } /** - * Get the resourceId value. + * Get the ID of the resource corresponding to this hop. * * @return the resourceId value */ @@ -88,7 +88,7 @@ public String resourceId() { } /** - * Get the nextHopIds value. + * Get list of next hop identifiers. * * @return the nextHopIds value */ @@ -97,7 +97,7 @@ public List nextHopIds() { } /** - * Get the issues value. + * Get list of issues. * * @return the issues value */ diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectivityIssue.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectivityIssue.java index d38de1af65d..dec1df8b9cf 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectivityIssue.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectivityIssue.java @@ -45,7 +45,7 @@ public class ConnectivityIssue { private List> context; /** - * Get the origin value. + * Get the origin of the issue. Possible values include: 'Local', 'Inbound', 'Outbound'. * * @return the origin value */ @@ -54,7 +54,7 @@ public Origin origin() { } /** - * Get the severity value. + * Get the severity of the issue. Possible values include: 'Error', 'Warning'. * * @return the severity value */ @@ -63,7 +63,7 @@ public Severity severity() { } /** - * Get the type value. + * Get the type of issue. Possible values include: 'Unknown', 'AgentStopped', 'GuestFirewall', 'DnsResolution', 'SocketBind', 'NetworkSecurityRule', 'UserDefinedRoute', 'PortThrottled', 'Platform'. * * @return the type value */ @@ -72,7 +72,7 @@ public IssueType type() { } /** - * Get the context value. + * Get provides additional context on the issue. * * @return the context value */ diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectivityParameters.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectivityParameters.java new file mode 100644 index 00000000000..3ed485bfbb4 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectivityParameters.java @@ -0,0 +1,122 @@ +/** + * 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.network; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameters that determine how the connectivity check will be performed. + */ +public class ConnectivityParameters { + /** + * The source property. + */ + @JsonProperty(value = "source", required = true) + private ConnectivitySource source; + + /** + * The destination property. + */ + @JsonProperty(value = "destination", required = true) + private ConnectivityDestination destination; + + /** + * Network protocol. Possible values include: 'Tcp', 'Http', 'Https', + * 'Icmp'. + */ + @JsonProperty(value = "protocol") + private Protocol protocol; + + /** + * The protocolConfiguration property. + */ + @JsonProperty(value = "protocolConfiguration") + private ProtocolConfiguration protocolConfiguration; + + /** + * Get the source value. + * + * @return the source value + */ + public ConnectivitySource source() { + return this.source; + } + + /** + * Set the source value. + * + * @param source the source value to set + * @return the ConnectivityParameters object itself. + */ + public ConnectivityParameters withSource(ConnectivitySource source) { + this.source = source; + return this; + } + + /** + * Get the destination value. + * + * @return the destination value + */ + public ConnectivityDestination destination() { + return this.destination; + } + + /** + * Set the destination value. + * + * @param destination the destination value to set + * @return the ConnectivityParameters object itself. + */ + public ConnectivityParameters withDestination(ConnectivityDestination destination) { + this.destination = destination; + return this; + } + + /** + * Get network protocol. Possible values include: 'Tcp', 'Http', 'Https', 'Icmp'. + * + * @return the protocol value + */ + public Protocol protocol() { + return this.protocol; + } + + /** + * Set network protocol. Possible values include: 'Tcp', 'Http', 'Https', 'Icmp'. + * + * @param protocol the protocol value to set + * @return the ConnectivityParameters object itself. + */ + public ConnectivityParameters withProtocol(Protocol protocol) { + this.protocol = protocol; + return this; + } + + /** + * Get the protocolConfiguration value. + * + * @return the protocolConfiguration value + */ + public ProtocolConfiguration protocolConfiguration() { + return this.protocolConfiguration; + } + + /** + * Set the protocolConfiguration value. + * + * @param protocolConfiguration the protocolConfiguration value to set + * @return the ConnectivityParameters object itself. + */ + public ConnectivityParameters withProtocolConfiguration(ProtocolConfiguration protocolConfiguration) { + this.protocolConfiguration = protocolConfiguration; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectivitySource.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectivitySource.java index 665c96c02ad..d9c66e23c90 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectivitySource.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectivitySource.java @@ -28,7 +28,7 @@ public class ConnectivitySource { private Integer port; /** - * Get the resourceId value. + * Get the ID of the resource from which a connectivity check will be initiated. * * @return the resourceId value */ @@ -37,7 +37,7 @@ public String resourceId() { } /** - * Set the resourceId value. + * Set the ID of the resource from which a connectivity check will be initiated. * * @param resourceId the resourceId value to set * @return the ConnectivitySource object itself. @@ -48,7 +48,7 @@ public ConnectivitySource withResourceId(String resourceId) { } /** - * Get the port value. + * Get the source port from which a connectivity check will be performed. * * @return the port value */ @@ -57,7 +57,7 @@ public Integer port() { } /** - * Set the port value. + * Set the source port from which a connectivity check will be performed. * * @param port the port value to set * @return the ConnectivitySource object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/DhGroup.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/DhGroup.java index 03348404d0d..1f65e1fca5c 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/DhGroup.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/DhGroup.java @@ -8,70 +8,52 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for DhGroup. */ -public final class DhGroup { +public final class DhGroup extends ExpandableStringEnum { /** Static value None for DhGroup. */ - public static final DhGroup NONE = new DhGroup("None"); + public static final DhGroup NONE = fromString("None"); /** Static value DHGroup1 for DhGroup. */ - public static final DhGroup DHGROUP1 = new DhGroup("DHGroup1"); + public static final DhGroup DHGROUP1 = fromString("DHGroup1"); /** Static value DHGroup2 for DhGroup. */ - public static final DhGroup DHGROUP2 = new DhGroup("DHGroup2"); + public static final DhGroup DHGROUP2 = fromString("DHGroup2"); /** Static value DHGroup14 for DhGroup. */ - public static final DhGroup DHGROUP14 = new DhGroup("DHGroup14"); + public static final DhGroup DHGROUP14 = fromString("DHGroup14"); /** Static value DHGroup2048 for DhGroup. */ - public static final DhGroup DHGROUP2048 = new DhGroup("DHGroup2048"); + public static final DhGroup DHGROUP2048 = fromString("DHGroup2048"); /** Static value ECP256 for DhGroup. */ - public static final DhGroup ECP256 = new DhGroup("ECP256"); + public static final DhGroup ECP256 = fromString("ECP256"); /** Static value ECP384 for DhGroup. */ - public static final DhGroup ECP384 = new DhGroup("ECP384"); + public static final DhGroup ECP384 = fromString("ECP384"); /** Static value DHGroup24 for DhGroup. */ - public static final DhGroup DHGROUP24 = new DhGroup("DHGroup24"); - - private String value; + public static final DhGroup DHGROUP24 = fromString("DHGroup24"); /** - * Creates a custom value for DhGroup. - * @param value the custom value + * Creates or finds a DhGroup from its string representation. + * @param name a name to look for + * @return the corresponding DhGroup */ - public DhGroup(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static DhGroup fromString(String name) { + return fromString(name, DhGroup.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof DhGroup)) { - return false; - } - if (obj == this) { - return true; - } - DhGroup rhs = (DhGroup) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known DhGroup values + */ + public static Collection values() { + return values(DhGroup.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/DhcpOptions.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/DhcpOptions.java index 11c9763802c..9a7465644cc 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/DhcpOptions.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/DhcpOptions.java @@ -24,7 +24,7 @@ public class DhcpOptions { private List dnsServers; /** - * Get the dnsServers value. + * Get the list of DNS servers IP addresses. * * @return the dnsServers value */ @@ -33,7 +33,7 @@ public List dnsServers() { } /** - * Set the dnsServers value. + * Set the list of DNS servers IP addresses. * * @param dnsServers the dnsServers value to set * @return the DhcpOptions object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Dimension.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Dimension.java new file mode 100644 index 00000000000..58a66b45ae3 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Dimension.java @@ -0,0 +1,95 @@ +/** + * 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.network; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Dimension of the metric. + */ +public class Dimension { + /** + * The name of the dimension. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The display name of the dimension. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /** + * The internal name of the dimension. + */ + @JsonProperty(value = "internalName") + private String internalName; + + /** + * Get the name of the dimension. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the dimension. + * + * @param name the name value to set + * @return the Dimension object itself. + */ + public Dimension withName(String name) { + this.name = name; + return this; + } + + /** + * Get the display name of the dimension. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the display name of the dimension. + * + * @param displayName the displayName value to set + * @return the Dimension object itself. + */ + public Dimension withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the internal name of the dimension. + * + * @return the internalName value + */ + public String internalName() { + return this.internalName; + } + + /** + * Set the internal name of the dimension. + * + * @param internalName the internalName value to set + * @return the Dimension object itself. + */ + public Dimension withInternalName(String internalName) { + this.internalName = internalName; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Direction.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Direction.java index 9ec4ab55ada..325a1acb18d 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Direction.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Direction.java @@ -8,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for Direction. */ -public final class Direction { +public final class Direction extends ExpandableStringEnum { /** Static value Inbound for Direction. */ - public static final Direction INBOUND = new Direction("Inbound"); + public static final Direction INBOUND = fromString("Inbound"); /** Static value Outbound for Direction. */ - public static final Direction OUTBOUND = new Direction("Outbound"); - - private String value; + public static final Direction OUTBOUND = fromString("Outbound"); /** - * Creates a custom value for Direction. - * @param value the custom value + * Creates or finds a Direction from its string representation. + * @param name a name to look for + * @return the corresponding Direction */ - public Direction(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static Direction fromString(String name) { + return fromString(name, Direction.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof Direction)) { - return false; - } - if (obj == this) { - return true; - } - Direction rhs = (Direction) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known Direction values + */ + public static Collection values() { + return values(Direction.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EffectiveNetworkSecurityGroup.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EffectiveNetworkSecurityGroup.java new file mode 100644 index 00000000000..4f81ffee4da --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EffectiveNetworkSecurityGroup.java @@ -0,0 +1,124 @@ +/** + * 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.network; + +import com.microsoft.azure.SubResource; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Effective network security group. + */ +public class EffectiveNetworkSecurityGroup { + /** + * The ID of network security group that is applied. + */ + @JsonProperty(value = "networkSecurityGroup") + private SubResource networkSecurityGroup; + + /** + * Associated resources. + */ + @JsonProperty(value = "association") + private EffectiveNetworkSecurityGroupAssociation association; + + /** + * A collection of effective security rules. + */ + @JsonProperty(value = "effectiveSecurityRules") + private List effectiveSecurityRules; + + /** + * Mapping of tags to list of IP Addresses included within the tag. + */ + @JsonProperty(value = "tagMap") + private Map> tagMap; + + /** + * Get the ID of network security group that is applied. + * + * @return the networkSecurityGroup value + */ + public SubResource networkSecurityGroup() { + return this.networkSecurityGroup; + } + + /** + * Set the ID of network security group that is applied. + * + * @param networkSecurityGroup the networkSecurityGroup value to set + * @return the EffectiveNetworkSecurityGroup object itself. + */ + public EffectiveNetworkSecurityGroup withNetworkSecurityGroup(SubResource networkSecurityGroup) { + this.networkSecurityGroup = networkSecurityGroup; + return this; + } + + /** + * Get associated resources. + * + * @return the association value + */ + public EffectiveNetworkSecurityGroupAssociation association() { + return this.association; + } + + /** + * Set associated resources. + * + * @param association the association value to set + * @return the EffectiveNetworkSecurityGroup object itself. + */ + public EffectiveNetworkSecurityGroup withAssociation(EffectiveNetworkSecurityGroupAssociation association) { + this.association = association; + return this; + } + + /** + * Get a collection of effective security rules. + * + * @return the effectiveSecurityRules value + */ + public List effectiveSecurityRules() { + return this.effectiveSecurityRules; + } + + /** + * Set a collection of effective security rules. + * + * @param effectiveSecurityRules the effectiveSecurityRules value to set + * @return the EffectiveNetworkSecurityGroup object itself. + */ + public EffectiveNetworkSecurityGroup withEffectiveSecurityRules(List effectiveSecurityRules) { + this.effectiveSecurityRules = effectiveSecurityRules; + return this; + } + + /** + * Get mapping of tags to list of IP Addresses included within the tag. + * + * @return the tagMap value + */ + public Map> tagMap() { + return this.tagMap; + } + + /** + * Set mapping of tags to list of IP Addresses included within the tag. + * + * @param tagMap the tagMap value to set + * @return the EffectiveNetworkSecurityGroup object itself. + */ + public EffectiveNetworkSecurityGroup withTagMap(Map> tagMap) { + this.tagMap = tagMap; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EffectiveNetworkSecurityGroupAssociation.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EffectiveNetworkSecurityGroupAssociation.java index 5fc7e0b03a5..e154cda8f8a 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EffectiveNetworkSecurityGroupAssociation.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EffectiveNetworkSecurityGroupAssociation.java @@ -28,7 +28,7 @@ public class EffectiveNetworkSecurityGroupAssociation { private SubResource networkInterface; /** - * Get the subnet value. + * Get the ID of the subnet if assigned. * * @return the subnet value */ @@ -37,7 +37,7 @@ public SubResource subnet() { } /** - * Set the subnet value. + * Set the ID of the subnet if assigned. * * @param subnet the subnet value to set * @return the EffectiveNetworkSecurityGroupAssociation object itself. @@ -48,7 +48,7 @@ public EffectiveNetworkSecurityGroupAssociation withSubnet(SubResource subnet) { } /** - * Get the networkInterface value. + * Get the ID of the network interface if assigned. * * @return the networkInterface value */ @@ -57,7 +57,7 @@ public SubResource networkInterface() { } /** - * Set the networkInterface value. + * Set the ID of the network interface if assigned. * * @param networkInterface the networkInterface value to set * @return the EffectiveNetworkSecurityGroupAssociation object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EffectiveNetworkSecurityRule.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EffectiveNetworkSecurityRule.java index e8274a2f151..35ccfefa9ae 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EffectiveNetworkSecurityRule.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EffectiveNetworkSecurityRule.java @@ -118,7 +118,7 @@ public class EffectiveNetworkSecurityRule { private SecurityRuleDirection direction; /** - * Get the name value. + * Get the name of the security rule specified by the user (if created by the user). * * @return the name value */ @@ -127,7 +127,7 @@ public String name() { } /** - * Set the name value. + * Set the name of the security rule specified by the user (if created by the user). * * @param name the name value to set * @return the EffectiveNetworkSecurityRule object itself. @@ -138,7 +138,7 @@ public EffectiveNetworkSecurityRule withName(String name) { } /** - * Get the protocol value. + * Get the network protocol this rule applies to. Possible values are: 'Tcp', 'Udp', and 'All'. Possible values include: 'Tcp', 'Udp', 'All'. * * @return the protocol value */ @@ -147,7 +147,7 @@ public EffectiveSecurityRuleProtocol protocol() { } /** - * Set the protocol value. + * Set the network protocol this rule applies to. Possible values are: 'Tcp', 'Udp', and 'All'. Possible values include: 'Tcp', 'Udp', 'All'. * * @param protocol the protocol value to set * @return the EffectiveNetworkSecurityRule object itself. @@ -158,7 +158,7 @@ public EffectiveNetworkSecurityRule withProtocol(EffectiveSecurityRuleProtocol p } /** - * Get the sourcePortRange value. + * Get the source port or range. * * @return the sourcePortRange value */ @@ -167,7 +167,7 @@ public String sourcePortRange() { } /** - * Set the sourcePortRange value. + * Set the source port or range. * * @param sourcePortRange the sourcePortRange value to set * @return the EffectiveNetworkSecurityRule object itself. @@ -178,7 +178,7 @@ public EffectiveNetworkSecurityRule withSourcePortRange(String sourcePortRange) } /** - * Get the destinationPortRange value. + * Get the destination port or range. * * @return the destinationPortRange value */ @@ -187,7 +187,7 @@ public String destinationPortRange() { } /** - * Set the destinationPortRange value. + * Set the destination port or range. * * @param destinationPortRange the destinationPortRange value to set * @return the EffectiveNetworkSecurityRule object itself. @@ -198,7 +198,7 @@ public EffectiveNetworkSecurityRule withDestinationPortRange(String destinationP } /** - * Get the sourcePortRanges value. + * Get the source port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as seperator (e.g. 100-400), or an asterix (*). * * @return the sourcePortRanges value */ @@ -207,7 +207,7 @@ public List sourcePortRanges() { } /** - * Set the sourcePortRanges value. + * Set the source port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as seperator (e.g. 100-400), or an asterix (*). * * @param sourcePortRanges the sourcePortRanges value to set * @return the EffectiveNetworkSecurityRule object itself. @@ -218,7 +218,7 @@ public EffectiveNetworkSecurityRule withSourcePortRanges(List sourcePort } /** - * Get the destinationPortRanges value. + * Get the destination port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as seperator (e.g. 100-400), or an asterix (*). * * @return the destinationPortRanges value */ @@ -227,7 +227,7 @@ public List destinationPortRanges() { } /** - * Set the destinationPortRanges value. + * Set the destination port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as seperator (e.g. 100-400), or an asterix (*). * * @param destinationPortRanges the destinationPortRanges value to set * @return the EffectiveNetworkSecurityRule object itself. @@ -238,7 +238,7 @@ public EffectiveNetworkSecurityRule withDestinationPortRanges(List desti } /** - * Get the sourceAddressPrefix value. + * Get the source address prefix. * * @return the sourceAddressPrefix value */ @@ -247,7 +247,7 @@ public String sourceAddressPrefix() { } /** - * Set the sourceAddressPrefix value. + * Set the source address prefix. * * @param sourceAddressPrefix the sourceAddressPrefix value to set * @return the EffectiveNetworkSecurityRule object itself. @@ -258,7 +258,7 @@ public EffectiveNetworkSecurityRule withSourceAddressPrefix(String sourceAddress } /** - * Get the destinationAddressPrefix value. + * Get the destination address prefix. * * @return the destinationAddressPrefix value */ @@ -267,7 +267,7 @@ public String destinationAddressPrefix() { } /** - * Set the destinationAddressPrefix value. + * Set the destination address prefix. * * @param destinationAddressPrefix the destinationAddressPrefix value to set * @return the EffectiveNetworkSecurityRule object itself. @@ -278,7 +278,7 @@ public EffectiveNetworkSecurityRule withDestinationAddressPrefix(String destinat } /** - * Get the sourceAddressPrefixes value. + * Get the source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AureLoadBalancer, Internet), System Tags, and the asterix (*). * * @return the sourceAddressPrefixes value */ @@ -287,7 +287,7 @@ public List sourceAddressPrefixes() { } /** - * Set the sourceAddressPrefixes value. + * Set the source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AureLoadBalancer, Internet), System Tags, and the asterix (*). * * @param sourceAddressPrefixes the sourceAddressPrefixes value to set * @return the EffectiveNetworkSecurityRule object itself. @@ -298,7 +298,7 @@ public EffectiveNetworkSecurityRule withSourceAddressPrefixes(List sourc } /** - * Get the destinationAddressPrefixes value. + * Get the destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AureLoadBalancer, Internet), System Tags, and the asterix (*). * * @return the destinationAddressPrefixes value */ @@ -307,7 +307,7 @@ public List destinationAddressPrefixes() { } /** - * Set the destinationAddressPrefixes value. + * Set the destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AureLoadBalancer, Internet), System Tags, and the asterix (*). * * @param destinationAddressPrefixes the destinationAddressPrefixes value to set * @return the EffectiveNetworkSecurityRule object itself. @@ -318,7 +318,7 @@ public EffectiveNetworkSecurityRule withDestinationAddressPrefixes(List } /** - * Get the expandedSourceAddressPrefix value. + * Get the expanded source address prefix. * * @return the expandedSourceAddressPrefix value */ @@ -327,7 +327,7 @@ public List expandedSourceAddressPrefix() { } /** - * Set the expandedSourceAddressPrefix value. + * Set the expanded source address prefix. * * @param expandedSourceAddressPrefix the expandedSourceAddressPrefix value to set * @return the EffectiveNetworkSecurityRule object itself. @@ -338,7 +338,7 @@ public EffectiveNetworkSecurityRule withExpandedSourceAddressPrefix(List } /** - * Get the expandedDestinationAddressPrefix value. + * Get expanded destination address prefix. * * @return the expandedDestinationAddressPrefix value */ @@ -347,7 +347,7 @@ public List expandedDestinationAddressPrefix() { } /** - * Set the expandedDestinationAddressPrefix value. + * Set expanded destination address prefix. * * @param expandedDestinationAddressPrefix the expandedDestinationAddressPrefix value to set * @return the EffectiveNetworkSecurityRule object itself. @@ -358,7 +358,7 @@ public EffectiveNetworkSecurityRule withExpandedDestinationAddressPrefix(List addressPrefix; + + /** + * The IP address of the next hop of the effective route. + */ + @JsonProperty(value = "nextHopIpAddress") + private List nextHopIpAddress; + + /** + * The type of Azure hop the packet should be sent to. Possible values are: + * 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', + * and 'None'. Possible values include: 'VirtualNetworkGateway', + * 'VnetLocal', 'Internet', 'VirtualAppliance', 'None'. + */ + @JsonProperty(value = "nextHopType") + private RouteNextHopType nextHopType; + + /** + * Get the name of the user defined route. This is optional. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the user defined route. This is optional. + * + * @param name the name value to set + * @return the EffectiveRoute object itself. + */ + public EffectiveRoute withName(String name) { + this.name = name; + return this; + } + + /** + * Get who created the route. Possible values are: 'Unknown', 'User', 'VirtualNetworkGateway', and 'Default'. Possible values include: 'Unknown', 'User', 'VirtualNetworkGateway', 'Default'. + * + * @return the source value + */ + public EffectiveRouteSource source() { + return this.source; + } + + /** + * Set who created the route. Possible values are: 'Unknown', 'User', 'VirtualNetworkGateway', and 'Default'. Possible values include: 'Unknown', 'User', 'VirtualNetworkGateway', 'Default'. + * + * @param source the source value to set + * @return the EffectiveRoute object itself. + */ + public EffectiveRoute withSource(EffectiveRouteSource source) { + this.source = source; + return this; + } + + /** + * Get the value of effective route. Possible values are: 'Active' and 'Invalid'. Possible values include: 'Active', 'Invalid'. + * + * @return the state value + */ + public EffectiveRouteState state() { + return this.state; + } + + /** + * Set the value of effective route. Possible values are: 'Active' and 'Invalid'. Possible values include: 'Active', 'Invalid'. + * + * @param state the state value to set + * @return the EffectiveRoute object itself. + */ + public EffectiveRoute withState(EffectiveRouteState state) { + this.state = state; + return this; + } + + /** + * Get the address prefixes of the effective routes in CIDR notation. + * + * @return the addressPrefix value + */ + public List addressPrefix() { + return this.addressPrefix; + } + + /** + * Set the address prefixes of the effective routes in CIDR notation. + * + * @param addressPrefix the addressPrefix value to set + * @return the EffectiveRoute object itself. + */ + public EffectiveRoute withAddressPrefix(List addressPrefix) { + this.addressPrefix = addressPrefix; + return this; + } + + /** + * Get the IP address of the next hop of the effective route. + * + * @return the nextHopIpAddress value + */ + public List nextHopIpAddress() { + return this.nextHopIpAddress; + } + + /** + * Set the IP address of the next hop of the effective route. + * + * @param nextHopIpAddress the nextHopIpAddress value to set + * @return the EffectiveRoute object itself. + */ + public EffectiveRoute withNextHopIpAddress(List nextHopIpAddress) { + this.nextHopIpAddress = nextHopIpAddress; + return this; + } + + /** + * Get the type of Azure hop the packet should be sent to. Possible values are: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'. Possible values include: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', 'None'. + * + * @return the nextHopType value + */ + public RouteNextHopType nextHopType() { + return this.nextHopType; + } + + /** + * Set the type of Azure hop the packet should be sent to. Possible values are: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'. Possible values include: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', 'None'. + * + * @param nextHopType the nextHopType value to set + * @return the EffectiveRoute object itself. + */ + public EffectiveRoute withNextHopType(RouteNextHopType nextHopType) { + this.nextHopType = nextHopType; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EffectiveRouteSource.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EffectiveRouteSource.java index ff8a569c247..a0da77b3daf 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EffectiveRouteSource.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EffectiveRouteSource.java @@ -8,58 +8,40 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for EffectiveRouteSource. */ -public final class EffectiveRouteSource { +public final class EffectiveRouteSource extends ExpandableStringEnum { /** Static value Unknown for EffectiveRouteSource. */ - public static final EffectiveRouteSource UNKNOWN = new EffectiveRouteSource("Unknown"); + public static final EffectiveRouteSource UNKNOWN = fromString("Unknown"); /** Static value User for EffectiveRouteSource. */ - public static final EffectiveRouteSource USER = new EffectiveRouteSource("User"); + public static final EffectiveRouteSource USER = fromString("User"); /** Static value VirtualNetworkGateway for EffectiveRouteSource. */ - public static final EffectiveRouteSource VIRTUAL_NETWORK_GATEWAY = new EffectiveRouteSource("VirtualNetworkGateway"); + public static final EffectiveRouteSource VIRTUAL_NETWORK_GATEWAY = fromString("VirtualNetworkGateway"); /** Static value Default for EffectiveRouteSource. */ - public static final EffectiveRouteSource DEFAULT = new EffectiveRouteSource("Default"); - - private String value; + public static final EffectiveRouteSource DEFAULT = fromString("Default"); /** - * Creates a custom value for EffectiveRouteSource. - * @param value the custom value + * Creates or finds a EffectiveRouteSource from its string representation. + * @param name a name to look for + * @return the corresponding EffectiveRouteSource */ - public EffectiveRouteSource(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static EffectiveRouteSource fromString(String name) { + return fromString(name, EffectiveRouteSource.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof EffectiveRouteSource)) { - return false; - } - if (obj == this) { - return true; - } - EffectiveRouteSource rhs = (EffectiveRouteSource) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known EffectiveRouteSource values + */ + public static Collection values() { + return values(EffectiveRouteSource.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EffectiveRouteState.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EffectiveRouteState.java index d5b9bd21f9f..b3a78f4385b 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EffectiveRouteState.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EffectiveRouteState.java @@ -8,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for EffectiveRouteState. */ -public final class EffectiveRouteState { +public final class EffectiveRouteState extends ExpandableStringEnum { /** Static value Active for EffectiveRouteState. */ - public static final EffectiveRouteState ACTIVE = new EffectiveRouteState("Active"); + public static final EffectiveRouteState ACTIVE = fromString("Active"); /** Static value Invalid for EffectiveRouteState. */ - public static final EffectiveRouteState INVALID = new EffectiveRouteState("Invalid"); - - private String value; + public static final EffectiveRouteState INVALID = fromString("Invalid"); /** - * Creates a custom value for EffectiveRouteState. - * @param value the custom value + * Creates or finds a EffectiveRouteState from its string representation. + * @param name a name to look for + * @return the corresponding EffectiveRouteState */ - public EffectiveRouteState(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static EffectiveRouteState fromString(String name) { + return fromString(name, EffectiveRouteState.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof EffectiveRouteState)) { - return false; - } - if (obj == this) { - return true; - } - EffectiveRouteState rhs = (EffectiveRouteState) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known EffectiveRouteState values + */ + public static Collection values() { + return values(EffectiveRouteState.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EffectiveSecurityRuleProtocol.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EffectiveSecurityRuleProtocol.java index 3d76690e139..3fec7790007 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EffectiveSecurityRuleProtocol.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EffectiveSecurityRuleProtocol.java @@ -8,55 +8,37 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for EffectiveSecurityRuleProtocol. */ -public final class EffectiveSecurityRuleProtocol { +public final class EffectiveSecurityRuleProtocol extends ExpandableStringEnum { /** Static value Tcp for EffectiveSecurityRuleProtocol. */ - public static final EffectiveSecurityRuleProtocol TCP = new EffectiveSecurityRuleProtocol("Tcp"); + public static final EffectiveSecurityRuleProtocol TCP = fromString("Tcp"); /** Static value Udp for EffectiveSecurityRuleProtocol. */ - public static final EffectiveSecurityRuleProtocol UDP = new EffectiveSecurityRuleProtocol("Udp"); + public static final EffectiveSecurityRuleProtocol UDP = fromString("Udp"); /** Static value All for EffectiveSecurityRuleProtocol. */ - public static final EffectiveSecurityRuleProtocol ALL = new EffectiveSecurityRuleProtocol("All"); - - private String value; + public static final EffectiveSecurityRuleProtocol ALL = fromString("All"); /** - * Creates a custom value for EffectiveSecurityRuleProtocol. - * @param value the custom value + * Creates or finds a EffectiveSecurityRuleProtocol from its string representation. + * @param name a name to look for + * @return the corresponding EffectiveSecurityRuleProtocol */ - public EffectiveSecurityRuleProtocol(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static EffectiveSecurityRuleProtocol fromString(String name) { + return fromString(name, EffectiveSecurityRuleProtocol.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof EffectiveSecurityRuleProtocol)) { - return false; - } - if (obj == this) { - return true; - } - EffectiveSecurityRuleProtocol rhs = (EffectiveSecurityRuleProtocol) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known EffectiveSecurityRuleProtocol values + */ + public static Collection values() { + return values(EffectiveSecurityRuleProtocol.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EvaluationState.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EvaluationState.java new file mode 100644 index 00000000000..feebdb22127 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EvaluationState.java @@ -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.network; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for EvaluationState. + */ +public final class EvaluationState extends ExpandableStringEnum { + /** Static value NotStarted for EvaluationState. */ + public static final EvaluationState NOT_STARTED = fromString("NotStarted"); + + /** Static value InProgress for EvaluationState. */ + public static final EvaluationState IN_PROGRESS = fromString("InProgress"); + + /** Static value Completed for EvaluationState. */ + public static final EvaluationState COMPLETED = fromString("Completed"); + + /** + * Creates or finds a EvaluationState from its string representation. + * @param name a name to look for + * @return the corresponding EvaluationState + */ + @JsonCreator + public static EvaluationState fromString(String name) { + return fromString(name, EvaluationState.class); + } + + /** + * @return known EvaluationState values + */ + public static Collection values() { + return values(EvaluationState.class); + } +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitArpTable.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitArpTable.java index 242e90b27f9..118e3f4b5b7 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitArpTable.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitArpTable.java @@ -15,13 +15,13 @@ */ public class ExpressRouteCircuitArpTable { /** - * Age. + * Entry age in minutes. */ @JsonProperty(value = "age") private Integer age; /** - * Interface. + * Interface address. */ @JsonProperty(value = "interface") private String interfaceProperty; @@ -39,7 +39,7 @@ public class ExpressRouteCircuitArpTable { private String macAddress; /** - * Get the age value. + * Get entry age in minutes. * * @return the age value */ @@ -48,7 +48,7 @@ public Integer age() { } /** - * Set the age value. + * Set entry age in minutes. * * @param age the age value to set * @return the ExpressRouteCircuitArpTable object itself. @@ -59,7 +59,7 @@ public ExpressRouteCircuitArpTable withAge(Integer age) { } /** - * Get the interfaceProperty value. + * Get interface address. * * @return the interfaceProperty value */ @@ -68,7 +68,7 @@ public String interfaceProperty() { } /** - * Set the interfaceProperty value. + * Set interface address. * * @param interfaceProperty the interfaceProperty value to set * @return the ExpressRouteCircuitArpTable object itself. @@ -79,7 +79,7 @@ public ExpressRouteCircuitArpTable withInterfaceProperty(String interfacePropert } /** - * Get the ipAddress value. + * Get the IP address. * * @return the ipAddress value */ @@ -88,7 +88,7 @@ public String ipAddress() { } /** - * Set the ipAddress value. + * Set the IP address. * * @param ipAddress the ipAddress value to set * @return the ExpressRouteCircuitArpTable object itself. @@ -99,7 +99,7 @@ public ExpressRouteCircuitArpTable withIpAddress(String ipAddress) { } /** - * Get the macAddress value. + * Get the MAC address. * * @return the macAddress value */ @@ -108,7 +108,7 @@ public String macAddress() { } /** - * Set the macAddress value. + * Set the MAC address. * * @param macAddress the macAddress value to set * @return the ExpressRouteCircuitArpTable object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitPeeringAdvertisedPublicPrefixState.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitPeeringAdvertisedPublicPrefixState.java index 25039341f87..12a070c9471 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitPeeringAdvertisedPublicPrefixState.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitPeeringAdvertisedPublicPrefixState.java @@ -8,58 +8,40 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for ExpressRouteCircuitPeeringAdvertisedPublicPrefixState. */ -public final class ExpressRouteCircuitPeeringAdvertisedPublicPrefixState { +public final class ExpressRouteCircuitPeeringAdvertisedPublicPrefixState extends ExpandableStringEnum { /** Static value NotConfigured for ExpressRouteCircuitPeeringAdvertisedPublicPrefixState. */ - public static final ExpressRouteCircuitPeeringAdvertisedPublicPrefixState NOT_CONFIGURED = new ExpressRouteCircuitPeeringAdvertisedPublicPrefixState("NotConfigured"); + public static final ExpressRouteCircuitPeeringAdvertisedPublicPrefixState NOT_CONFIGURED = fromString("NotConfigured"); /** Static value Configuring for ExpressRouteCircuitPeeringAdvertisedPublicPrefixState. */ - public static final ExpressRouteCircuitPeeringAdvertisedPublicPrefixState CONFIGURING = new ExpressRouteCircuitPeeringAdvertisedPublicPrefixState("Configuring"); + public static final ExpressRouteCircuitPeeringAdvertisedPublicPrefixState CONFIGURING = fromString("Configuring"); /** Static value Configured for ExpressRouteCircuitPeeringAdvertisedPublicPrefixState. */ - public static final ExpressRouteCircuitPeeringAdvertisedPublicPrefixState CONFIGURED = new ExpressRouteCircuitPeeringAdvertisedPublicPrefixState("Configured"); + public static final ExpressRouteCircuitPeeringAdvertisedPublicPrefixState CONFIGURED = fromString("Configured"); /** Static value ValidationNeeded for ExpressRouteCircuitPeeringAdvertisedPublicPrefixState. */ - public static final ExpressRouteCircuitPeeringAdvertisedPublicPrefixState VALIDATION_NEEDED = new ExpressRouteCircuitPeeringAdvertisedPublicPrefixState("ValidationNeeded"); - - private String value; + public static final ExpressRouteCircuitPeeringAdvertisedPublicPrefixState VALIDATION_NEEDED = fromString("ValidationNeeded"); /** - * Creates a custom value for ExpressRouteCircuitPeeringAdvertisedPublicPrefixState. - * @param value the custom value + * Creates or finds a ExpressRouteCircuitPeeringAdvertisedPublicPrefixState from its string representation. + * @param name a name to look for + * @return the corresponding ExpressRouteCircuitPeeringAdvertisedPublicPrefixState */ - public ExpressRouteCircuitPeeringAdvertisedPublicPrefixState(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static ExpressRouteCircuitPeeringAdvertisedPublicPrefixState fromString(String name) { + return fromString(name, ExpressRouteCircuitPeeringAdvertisedPublicPrefixState.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof ExpressRouteCircuitPeeringAdvertisedPublicPrefixState)) { - return false; - } - if (obj == this) { - return true; - } - ExpressRouteCircuitPeeringAdvertisedPublicPrefixState rhs = (ExpressRouteCircuitPeeringAdvertisedPublicPrefixState) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known ExpressRouteCircuitPeeringAdvertisedPublicPrefixState values + */ + public static Collection values() { + return values(ExpressRouteCircuitPeeringAdvertisedPublicPrefixState.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitPeeringConfig.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitPeeringConfig.java index ccb7effc4e4..b33af6d8322 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitPeeringConfig.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitPeeringConfig.java @@ -55,7 +55,7 @@ public class ExpressRouteCircuitPeeringConfig { private String routingRegistryName; /** - * Get the advertisedPublicPrefixes value. + * Get the reference of AdvertisedPublicPrefixes. * * @return the advertisedPublicPrefixes value */ @@ -64,7 +64,7 @@ public List advertisedPublicPrefixes() { } /** - * Set the advertisedPublicPrefixes value. + * Set the reference of AdvertisedPublicPrefixes. * * @param advertisedPublicPrefixes the advertisedPublicPrefixes value to set * @return the ExpressRouteCircuitPeeringConfig object itself. @@ -75,7 +75,7 @@ public ExpressRouteCircuitPeeringConfig withAdvertisedPublicPrefixes(List advertisedCommunities() { } /** - * Set the advertisedCommunities value. + * Set the communities of bgp peering. Spepcified for microsoft peering. * * @param advertisedCommunities the advertisedCommunities value to set * @return the ExpressRouteCircuitPeeringConfig object itself. @@ -95,7 +95,7 @@ public ExpressRouteCircuitPeeringConfig withAdvertisedCommunities(List a } /** - * Get the advertisedPublicPrefixesState value. + * Get advertisedPublicPrefixState of the Peering resource. Possible values are 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. Possible values include: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded'. * * @return the advertisedPublicPrefixesState value */ @@ -104,7 +104,7 @@ public ExpressRouteCircuitPeeringAdvertisedPublicPrefixState advertisedPublicPre } /** - * Set the advertisedPublicPrefixesState value. + * Set advertisedPublicPrefixState of the Peering resource. Possible values are 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. Possible values include: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded'. * * @param advertisedPublicPrefixesState the advertisedPublicPrefixesState value to set * @return the ExpressRouteCircuitPeeringConfig object itself. @@ -115,7 +115,7 @@ public ExpressRouteCircuitPeeringConfig withAdvertisedPublicPrefixesState(Expres } /** - * Get the legacyMode value. + * Get the legacy mode of the peering. * * @return the legacyMode value */ @@ -124,7 +124,7 @@ public Integer legacyMode() { } /** - * Set the legacyMode value. + * Set the legacy mode of the peering. * * @param legacyMode the legacyMode value to set * @return the ExpressRouteCircuitPeeringConfig object itself. @@ -135,7 +135,7 @@ public ExpressRouteCircuitPeeringConfig withLegacyMode(Integer legacyMode) { } /** - * Get the customerASN value. + * Get the CustomerASN of the peering. * * @return the customerASN value */ @@ -144,7 +144,7 @@ public Integer customerASN() { } /** - * Set the customerASN value. + * Set the CustomerASN of the peering. * * @param customerASN the customerASN value to set * @return the ExpressRouteCircuitPeeringConfig object itself. @@ -155,7 +155,7 @@ public ExpressRouteCircuitPeeringConfig withCustomerASN(Integer customerASN) { } /** - * Get the routingRegistryName value. + * Get the RoutingRegistryName of the configuration. * * @return the routingRegistryName value */ @@ -164,7 +164,7 @@ public String routingRegistryName() { } /** - * Set the routingRegistryName value. + * Set the RoutingRegistryName of the configuration. * * @param routingRegistryName the routingRegistryName value to set * @return the ExpressRouteCircuitPeeringConfig object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitPeeringState.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitPeeringState.java index ea180c1330d..49ac407f0ec 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitPeeringState.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitPeeringState.java @@ -8,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for ExpressRouteCircuitPeeringState. */ -public final class ExpressRouteCircuitPeeringState { +public final class ExpressRouteCircuitPeeringState extends ExpandableStringEnum { /** Static value Disabled for ExpressRouteCircuitPeeringState. */ - public static final ExpressRouteCircuitPeeringState DISABLED = new ExpressRouteCircuitPeeringState("Disabled"); + public static final ExpressRouteCircuitPeeringState DISABLED = fromString("Disabled"); /** Static value Enabled for ExpressRouteCircuitPeeringState. */ - public static final ExpressRouteCircuitPeeringState ENABLED = new ExpressRouteCircuitPeeringState("Enabled"); - - private String value; + public static final ExpressRouteCircuitPeeringState ENABLED = fromString("Enabled"); /** - * Creates a custom value for ExpressRouteCircuitPeeringState. - * @param value the custom value + * Creates or finds a ExpressRouteCircuitPeeringState from its string representation. + * @param name a name to look for + * @return the corresponding ExpressRouteCircuitPeeringState */ - public ExpressRouteCircuitPeeringState(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static ExpressRouteCircuitPeeringState fromString(String name) { + return fromString(name, ExpressRouteCircuitPeeringState.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof ExpressRouteCircuitPeeringState)) { - return false; - } - if (obj == this) { - return true; - } - ExpressRouteCircuitPeeringState rhs = (ExpressRouteCircuitPeeringState) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known ExpressRouteCircuitPeeringState values + */ + public static Collection values() { + return values(ExpressRouteCircuitPeeringState.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitPeeringType.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitPeeringType.java index 1458c615cfe..0e5b3255861 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitPeeringType.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitPeeringType.java @@ -8,55 +8,37 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for ExpressRouteCircuitPeeringType. */ -public final class ExpressRouteCircuitPeeringType { +public final class ExpressRouteCircuitPeeringType extends ExpandableStringEnum { /** Static value AzurePublicPeering for ExpressRouteCircuitPeeringType. */ - public static final ExpressRouteCircuitPeeringType AZURE_PUBLIC_PEERING = new ExpressRouteCircuitPeeringType("AzurePublicPeering"); + public static final ExpressRouteCircuitPeeringType AZURE_PUBLIC_PEERING = fromString("AzurePublicPeering"); /** Static value AzurePrivatePeering for ExpressRouteCircuitPeeringType. */ - public static final ExpressRouteCircuitPeeringType AZURE_PRIVATE_PEERING = new ExpressRouteCircuitPeeringType("AzurePrivatePeering"); + public static final ExpressRouteCircuitPeeringType AZURE_PRIVATE_PEERING = fromString("AzurePrivatePeering"); /** Static value MicrosoftPeering for ExpressRouteCircuitPeeringType. */ - public static final ExpressRouteCircuitPeeringType MICROSOFT_PEERING = new ExpressRouteCircuitPeeringType("MicrosoftPeering"); - - private String value; + public static final ExpressRouteCircuitPeeringType MICROSOFT_PEERING = fromString("MicrosoftPeering"); /** - * Creates a custom value for ExpressRouteCircuitPeeringType. - * @param value the custom value + * Creates or finds a ExpressRouteCircuitPeeringType from its string representation. + * @param name a name to look for + * @return the corresponding ExpressRouteCircuitPeeringType */ - public ExpressRouteCircuitPeeringType(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static ExpressRouteCircuitPeeringType fromString(String name) { + return fromString(name, ExpressRouteCircuitPeeringType.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof ExpressRouteCircuitPeeringType)) { - return false; - } - if (obj == this) { - return true; - } - ExpressRouteCircuitPeeringType rhs = (ExpressRouteCircuitPeeringType) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known ExpressRouteCircuitPeeringType values + */ + public static Collection values() { + return values(ExpressRouteCircuitPeeringType.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitReference.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitReference.java new file mode 100644 index 00000000000..ff9383fc473 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitReference.java @@ -0,0 +1,43 @@ +/** + * 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.network; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The ExpressRouteCircuitReference model. + */ +public class ExpressRouteCircuitReference { + /** + * Corresponding Express Route Circuit Id. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get corresponding Express Route Circuit Id. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set corresponding Express Route Circuit Id. + * + * @param id the id value to set + * @return the ExpressRouteCircuitReference object itself. + */ + public ExpressRouteCircuitReference withId(String id) { + this.id = id; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitRoutesTable.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitRoutesTable.java index 8468746664c..343f971532d 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitRoutesTable.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitRoutesTable.java @@ -15,37 +15,38 @@ */ public class ExpressRouteCircuitRoutesTable { /** - * network. + * IP address of a network entity. */ @JsonProperty(value = "network") private String network; /** - * nextHop. + * NextHop address. */ @JsonProperty(value = "nextHop") private String nextHop; /** - * locPrf. + * Local preference value as set with the set local-preference route-map + * configuration command. */ @JsonProperty(value = "locPrf") private String locPrf; /** - * weight. + * Route Weight. */ @JsonProperty(value = "weight") private Integer weight; /** - * path. + * Autonomous system paths to the destination network. */ @JsonProperty(value = "path") private String path; /** - * Get the network value. + * Get iP address of a network entity. * * @return the network value */ @@ -54,7 +55,7 @@ public String network() { } /** - * Set the network value. + * Set iP address of a network entity. * * @param network the network value to set * @return the ExpressRouteCircuitRoutesTable object itself. @@ -65,7 +66,7 @@ public ExpressRouteCircuitRoutesTable withNetwork(String network) { } /** - * Get the nextHop value. + * Get nextHop address. * * @return the nextHop value */ @@ -74,7 +75,7 @@ public String nextHop() { } /** - * Set the nextHop value. + * Set nextHop address. * * @param nextHop the nextHop value to set * @return the ExpressRouteCircuitRoutesTable object itself. @@ -85,7 +86,7 @@ public ExpressRouteCircuitRoutesTable withNextHop(String nextHop) { } /** - * Get the locPrf value. + * Get local preference value as set with the set local-preference route-map configuration command. * * @return the locPrf value */ @@ -94,7 +95,7 @@ public String locPrf() { } /** - * Set the locPrf value. + * Set local preference value as set with the set local-preference route-map configuration command. * * @param locPrf the locPrf value to set * @return the ExpressRouteCircuitRoutesTable object itself. @@ -105,7 +106,7 @@ public ExpressRouteCircuitRoutesTable withLocPrf(String locPrf) { } /** - * Get the weight value. + * Get route Weight. * * @return the weight value */ @@ -114,7 +115,7 @@ public Integer weight() { } /** - * Set the weight value. + * Set route Weight. * * @param weight the weight value to set * @return the ExpressRouteCircuitRoutesTable object itself. @@ -125,7 +126,7 @@ public ExpressRouteCircuitRoutesTable withWeight(Integer weight) { } /** - * Get the path value. + * Get autonomous system paths to the destination network. * * @return the path value */ @@ -134,7 +135,7 @@ public String path() { } /** - * Set the path value. + * Set autonomous system paths to the destination network. * * @param path the path value to set * @return the ExpressRouteCircuitRoutesTable object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitRoutesTableSummary.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitRoutesTableSummary.java index f22c19003ee..8d4770d2ab0 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitRoutesTableSummary.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitRoutesTableSummary.java @@ -15,7 +15,7 @@ */ public class ExpressRouteCircuitRoutesTableSummary { /** - * Neighbor. + * IP address of the neighbor. */ @JsonProperty(value = "neighbor") private String neighbor; @@ -47,7 +47,7 @@ public class ExpressRouteCircuitRoutesTableSummary { private String statePfxRcd; /** - * Get the neighbor value. + * Get iP address of the neighbor. * * @return the neighbor value */ @@ -56,7 +56,7 @@ public String neighbor() { } /** - * Set the neighbor value. + * Set iP address of the neighbor. * * @param neighbor the neighbor value to set * @return the ExpressRouteCircuitRoutesTableSummary object itself. @@ -67,7 +67,7 @@ public ExpressRouteCircuitRoutesTableSummary withNeighbor(String neighbor) { } /** - * Get the v value. + * Get bGP version number spoken to the neighbor. * * @return the v value */ @@ -76,7 +76,7 @@ public Integer v() { } /** - * Set the v value. + * Set bGP version number spoken to the neighbor. * * @param v the v value to set * @return the ExpressRouteCircuitRoutesTableSummary object itself. @@ -87,7 +87,7 @@ public ExpressRouteCircuitRoutesTableSummary withV(Integer v) { } /** - * Get the as value. + * Get autonomous system number. * * @return the as value */ @@ -96,7 +96,7 @@ public Integer as() { } /** - * Set the as value. + * Set autonomous system number. * * @param as the as value to set * @return the ExpressRouteCircuitRoutesTableSummary object itself. @@ -107,7 +107,7 @@ public ExpressRouteCircuitRoutesTableSummary withAs(Integer as) { } /** - * Get the upDown value. + * Get the length of time that the BGP session has been in the Established state, or the current status if not in the Established state. * * @return the upDown value */ @@ -116,7 +116,7 @@ public String upDown() { } /** - * Set the upDown value. + * Set the length of time that the BGP session has been in the Established state, or the current status if not in the Established state. * * @param upDown the upDown value to set * @return the ExpressRouteCircuitRoutesTableSummary object itself. @@ -127,7 +127,7 @@ public ExpressRouteCircuitRoutesTableSummary withUpDown(String upDown) { } /** - * Get the statePfxRcd value. + * Get current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group. * * @return the statePfxRcd value */ @@ -136,7 +136,7 @@ public String statePfxRcd() { } /** - * Set the statePfxRcd value. + * Set current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group. * * @param statePfxRcd the statePfxRcd value to set * @return the ExpressRouteCircuitRoutesTableSummary object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitServiceProviderProperties.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitServiceProviderProperties.java index ae9e73f972d..1379232b293 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitServiceProviderProperties.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitServiceProviderProperties.java @@ -33,7 +33,7 @@ public class ExpressRouteCircuitServiceProviderProperties { private Integer bandwidthInMbps; /** - * Get the serviceProviderName value. + * Get the serviceProviderName. * * @return the serviceProviderName value */ @@ -42,7 +42,7 @@ public String serviceProviderName() { } /** - * Set the serviceProviderName value. + * Set the serviceProviderName. * * @param serviceProviderName the serviceProviderName value to set * @return the ExpressRouteCircuitServiceProviderProperties object itself. @@ -53,7 +53,7 @@ public ExpressRouteCircuitServiceProviderProperties withServiceProviderName(Stri } /** - * Get the peeringLocation value. + * Get the peering location. * * @return the peeringLocation value */ @@ -62,7 +62,7 @@ public String peeringLocation() { } /** - * Set the peeringLocation value. + * Set the peering location. * * @param peeringLocation the peeringLocation value to set * @return the ExpressRouteCircuitServiceProviderProperties object itself. @@ -73,7 +73,7 @@ public ExpressRouteCircuitServiceProviderProperties withPeeringLocation(String p } /** - * Get the bandwidthInMbps value. + * Get the BandwidthInMbps. * * @return the bandwidthInMbps value */ @@ -82,7 +82,7 @@ public Integer bandwidthInMbps() { } /** - * Set the bandwidthInMbps value. + * Set the BandwidthInMbps. * * @param bandwidthInMbps the bandwidthInMbps value to set * @return the ExpressRouteCircuitServiceProviderProperties object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitSku.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitSku.java index 75a8a3eaa19..853ee7b30e1 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitSku.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitSku.java @@ -35,7 +35,7 @@ public class ExpressRouteCircuitSku { private ExpressRouteCircuitSkuFamily family; /** - * Get the name value. + * Get the name of the SKU. * * @return the name value */ @@ -44,7 +44,7 @@ public String name() { } /** - * Set the name value. + * Set the name of the SKU. * * @param name the name value to set * @return the ExpressRouteCircuitSku object itself. @@ -55,7 +55,7 @@ public ExpressRouteCircuitSku withName(String name) { } /** - * Get the tier value. + * Get the tier of the SKU. Possible values are 'Standard' and 'Premium'. Possible values include: 'Standard', 'Premium'. * * @return the tier value */ @@ -64,7 +64,7 @@ public ExpressRouteCircuitSkuTier tier() { } /** - * Set the tier value. + * Set the tier of the SKU. Possible values are 'Standard' and 'Premium'. Possible values include: 'Standard', 'Premium'. * * @param tier the tier value to set * @return the ExpressRouteCircuitSku object itself. @@ -75,7 +75,7 @@ public ExpressRouteCircuitSku withTier(ExpressRouteCircuitSkuTier tier) { } /** - * Get the family value. + * Get the family of the SKU. Possible values are: 'UnlimitedData' and 'MeteredData'. Possible values include: 'UnlimitedData', 'MeteredData'. * * @return the family value */ @@ -84,7 +84,7 @@ public ExpressRouteCircuitSkuFamily family() { } /** - * Set the family value. + * Set the family of the SKU. Possible values are: 'UnlimitedData' and 'MeteredData'. Possible values include: 'UnlimitedData', 'MeteredData'. * * @param family the family value to set * @return the ExpressRouteCircuitSku object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitSkuFamily.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitSkuFamily.java index 87c97ea5466..84059904697 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitSkuFamily.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitSkuFamily.java @@ -8,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for ExpressRouteCircuitSkuFamily. */ -public final class ExpressRouteCircuitSkuFamily { +public final class ExpressRouteCircuitSkuFamily extends ExpandableStringEnum { /** Static value UnlimitedData for ExpressRouteCircuitSkuFamily. */ - public static final ExpressRouteCircuitSkuFamily UNLIMITED_DATA = new ExpressRouteCircuitSkuFamily("UnlimitedData"); + public static final ExpressRouteCircuitSkuFamily UNLIMITED_DATA = fromString("UnlimitedData"); /** Static value MeteredData for ExpressRouteCircuitSkuFamily. */ - public static final ExpressRouteCircuitSkuFamily METERED_DATA = new ExpressRouteCircuitSkuFamily("MeteredData"); - - private String value; + public static final ExpressRouteCircuitSkuFamily METERED_DATA = fromString("MeteredData"); /** - * Creates a custom value for ExpressRouteCircuitSkuFamily. - * @param value the custom value + * Creates or finds a ExpressRouteCircuitSkuFamily from its string representation. + * @param name a name to look for + * @return the corresponding ExpressRouteCircuitSkuFamily */ - public ExpressRouteCircuitSkuFamily(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static ExpressRouteCircuitSkuFamily fromString(String name) { + return fromString(name, ExpressRouteCircuitSkuFamily.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof ExpressRouteCircuitSkuFamily)) { - return false; - } - if (obj == this) { - return true; - } - ExpressRouteCircuitSkuFamily rhs = (ExpressRouteCircuitSkuFamily) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known ExpressRouteCircuitSkuFamily values + */ + public static Collection values() { + return values(ExpressRouteCircuitSkuFamily.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitSkuTier.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitSkuTier.java index d2c90542132..32389fc8dfe 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitSkuTier.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitSkuTier.java @@ -8,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for ExpressRouteCircuitSkuTier. */ -public final class ExpressRouteCircuitSkuTier { +public final class ExpressRouteCircuitSkuTier extends ExpandableStringEnum { /** Static value Standard for ExpressRouteCircuitSkuTier. */ - public static final ExpressRouteCircuitSkuTier STANDARD = new ExpressRouteCircuitSkuTier("Standard"); + public static final ExpressRouteCircuitSkuTier STANDARD = fromString("Standard"); /** Static value Premium for ExpressRouteCircuitSkuTier. */ - public static final ExpressRouteCircuitSkuTier PREMIUM = new ExpressRouteCircuitSkuTier("Premium"); - - private String value; + public static final ExpressRouteCircuitSkuTier PREMIUM = fromString("Premium"); /** - * Creates a custom value for ExpressRouteCircuitSkuTier. - * @param value the custom value + * Creates or finds a ExpressRouteCircuitSkuTier from its string representation. + * @param name a name to look for + * @return the corresponding ExpressRouteCircuitSkuTier */ - public ExpressRouteCircuitSkuTier(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static ExpressRouteCircuitSkuTier fromString(String name) { + return fromString(name, ExpressRouteCircuitSkuTier.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof ExpressRouteCircuitSkuTier)) { - return false; - } - if (obj == this) { - return true; - } - ExpressRouteCircuitSkuTier rhs = (ExpressRouteCircuitSkuTier) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known ExpressRouteCircuitSkuTier values + */ + public static Collection values() { + return values(ExpressRouteCircuitSkuTier.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCrossConnectionRoutesTableSummary.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCrossConnectionRoutesTableSummary.java new file mode 100644 index 00000000000..319de7e16e1 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCrossConnectionRoutesTableSummary.java @@ -0,0 +1,123 @@ +/** + * 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.network; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The routes table associated with the ExpressRouteCircuit. + */ +public class ExpressRouteCrossConnectionRoutesTableSummary { + /** + * IP address of Neighbor router. + */ + @JsonProperty(value = "neighbor") + private String neighbor; + + /** + * Autonomous system number. + */ + @JsonProperty(value = "asn") + private Integer asn; + + /** + * The length of time that the BGP session has been in the Established + * state, or the current status if not in the Established state. + */ + @JsonProperty(value = "upDown") + private String upDown; + + /** + * Current state of the BGP session, and the number of prefixes that have + * been received from a neighbor or peer group. + */ + @JsonProperty(value = "stateOrPrefixesReceived") + private String stateOrPrefixesReceived; + + /** + * Get iP address of Neighbor router. + * + * @return the neighbor value + */ + public String neighbor() { + return this.neighbor; + } + + /** + * Set iP address of Neighbor router. + * + * @param neighbor the neighbor value to set + * @return the ExpressRouteCrossConnectionRoutesTableSummary object itself. + */ + public ExpressRouteCrossConnectionRoutesTableSummary withNeighbor(String neighbor) { + this.neighbor = neighbor; + return this; + } + + /** + * Get autonomous system number. + * + * @return the asn value + */ + public Integer asn() { + return this.asn; + } + + /** + * Set autonomous system number. + * + * @param asn the asn value to set + * @return the ExpressRouteCrossConnectionRoutesTableSummary object itself. + */ + public ExpressRouteCrossConnectionRoutesTableSummary withAsn(Integer asn) { + this.asn = asn; + return this; + } + + /** + * Get the length of time that the BGP session has been in the Established state, or the current status if not in the Established state. + * + * @return the upDown value + */ + public String upDown() { + return this.upDown; + } + + /** + * Set the length of time that the BGP session has been in the Established state, or the current status if not in the Established state. + * + * @param upDown the upDown value to set + * @return the ExpressRouteCrossConnectionRoutesTableSummary object itself. + */ + public ExpressRouteCrossConnectionRoutesTableSummary withUpDown(String upDown) { + this.upDown = upDown; + return this; + } + + /** + * Get current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group. + * + * @return the stateOrPrefixesReceived value + */ + public String stateOrPrefixesReceived() { + return this.stateOrPrefixesReceived; + } + + /** + * Set current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group. + * + * @param stateOrPrefixesReceived the stateOrPrefixesReceived value to set + * @return the ExpressRouteCrossConnectionRoutesTableSummary object itself. + */ + public ExpressRouteCrossConnectionRoutesTableSummary withStateOrPrefixesReceived(String stateOrPrefixesReceived) { + this.stateOrPrefixesReceived = stateOrPrefixesReceived; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRoutePeeringState.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRoutePeeringState.java new file mode 100644 index 00000000000..756bdadac6e --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRoutePeeringState.java @@ -0,0 +1,41 @@ +/** + * 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.network; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ExpressRoutePeeringState. + */ +public final class ExpressRoutePeeringState extends ExpandableStringEnum { + /** Static value Disabled for ExpressRoutePeeringState. */ + public static final ExpressRoutePeeringState DISABLED = fromString("Disabled"); + + /** Static value Enabled for ExpressRoutePeeringState. */ + public static final ExpressRoutePeeringState ENABLED = fromString("Enabled"); + + /** + * Creates or finds a ExpressRoutePeeringState from its string representation. + * @param name a name to look for + * @return the corresponding ExpressRoutePeeringState + */ + @JsonCreator + public static ExpressRoutePeeringState fromString(String name) { + return fromString(name, ExpressRoutePeeringState.class); + } + + /** + * @return known ExpressRoutePeeringState values + */ + public static Collection values() { + return values(ExpressRoutePeeringState.class); + } +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRoutePeeringType.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRoutePeeringType.java new file mode 100644 index 00000000000..5fad5585fa3 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRoutePeeringType.java @@ -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.network; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ExpressRoutePeeringType. + */ +public final class ExpressRoutePeeringType extends ExpandableStringEnum { + /** Static value AzurePublicPeering for ExpressRoutePeeringType. */ + public static final ExpressRoutePeeringType AZURE_PUBLIC_PEERING = fromString("AzurePublicPeering"); + + /** Static value AzurePrivatePeering for ExpressRoutePeeringType. */ + public static final ExpressRoutePeeringType AZURE_PRIVATE_PEERING = fromString("AzurePrivatePeering"); + + /** Static value MicrosoftPeering for ExpressRoutePeeringType. */ + public static final ExpressRoutePeeringType MICROSOFT_PEERING = fromString("MicrosoftPeering"); + + /** + * Creates or finds a ExpressRoutePeeringType from its string representation. + * @param name a name to look for + * @return the corresponding ExpressRoutePeeringType + */ + @JsonCreator + public static ExpressRoutePeeringType fromString(String name) { + return fromString(name, ExpressRoutePeeringType.class); + } + + /** + * @return known ExpressRoutePeeringType values + */ + public static Collection values() { + return values(ExpressRoutePeeringType.class); + } +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteServiceProviderBandwidthsOffered.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteServiceProviderBandwidthsOffered.java index 2476515c467..109a2759c0b 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteServiceProviderBandwidthsOffered.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteServiceProviderBandwidthsOffered.java @@ -27,7 +27,7 @@ public class ExpressRouteServiceProviderBandwidthsOffered { private Integer valueInMbps; /** - * Get the offerName value. + * Get the OfferName. * * @return the offerName value */ @@ -36,7 +36,7 @@ public String offerName() { } /** - * Set the offerName value. + * Set the OfferName. * * @param offerName the offerName value to set * @return the ExpressRouteServiceProviderBandwidthsOffered object itself. @@ -47,7 +47,7 @@ public ExpressRouteServiceProviderBandwidthsOffered withOfferName(String offerNa } /** - * Get the valueInMbps value. + * Get the ValueInMbps. * * @return the valueInMbps value */ @@ -56,7 +56,7 @@ public Integer valueInMbps() { } /** - * Set the valueInMbps value. + * Set the ValueInMbps. * * @param valueInMbps the valueInMbps value to set * @return the ExpressRouteServiceProviderBandwidthsOffered object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/FlowLogStatusParameters.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/FlowLogStatusParameters.java index 109abb373dc..be18a812ee7 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/FlowLogStatusParameters.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/FlowLogStatusParameters.java @@ -11,17 +11,19 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** - * Parameters that define a resource to query flow log status. + * Parameters that define a resource to query flow log and traffic analytics + * (optional) status. */ public class FlowLogStatusParameters { /** - * The target resource where getting the flow logging status. + * The target resource where getting the flow log and traffic analytics + * (optional) status. */ @JsonProperty(value = "targetResourceId", required = true) private String targetResourceId; /** - * Get the targetResourceId value. + * Get the target resource where getting the flow log and traffic analytics (optional) status. * * @return the targetResourceId value */ @@ -30,7 +32,7 @@ public String targetResourceId() { } /** - * Set the targetResourceId value. + * Set the target resource where getting the flow log and traffic analytics (optional) status. * * @param targetResourceId the targetResourceId value to set * @return the FlowLogStatusParameters object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/GatewayRoute.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/GatewayRoute.java index 49e8d72fb82..c3f17d83982 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/GatewayRoute.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/GatewayRoute.java @@ -57,7 +57,7 @@ public class GatewayRoute { private Integer weight; /** - * Get the localAddress value. + * Get the gateway's local address. * * @return the localAddress value */ @@ -66,7 +66,7 @@ public String localAddress() { } /** - * Get the network value. + * Get the route's network prefix. * * @return the network value */ @@ -75,7 +75,7 @@ public String network() { } /** - * Get the nextHop value. + * Get the route's next hop. * * @return the nextHop value */ @@ -84,7 +84,7 @@ public String nextHop() { } /** - * Get the sourcePeer value. + * Get the peer this route was learned from. * * @return the sourcePeer value */ @@ -93,7 +93,7 @@ public String sourcePeer() { } /** - * Get the origin value. + * Get the source this route was learned from. * * @return the origin value */ @@ -102,7 +102,7 @@ public String origin() { } /** - * Get the asPath value. + * Get the route's AS path sequence. * * @return the asPath value */ @@ -111,7 +111,7 @@ public String asPath() { } /** - * Get the weight value. + * Get the route's weight. * * @return the weight value */ diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/HTTPConfiguration.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/HTTPConfiguration.java new file mode 100644 index 00000000000..7566bc6cd03 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/HTTPConfiguration.java @@ -0,0 +1,96 @@ +/** + * 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.network; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * HTTP configuration of the connectivity check. + */ +public class HTTPConfiguration { + /** + * HTTP method. Possible values include: 'Get'. + */ + @JsonProperty(value = "method") + private HTTPMethod method; + + /** + * List of HTTP headers. + */ + @JsonProperty(value = "headers") + private List headers; + + /** + * Valid status codes. + */ + @JsonProperty(value = "validStatusCodes") + private List validStatusCodes; + + /** + * Get hTTP method. Possible values include: 'Get'. + * + * @return the method value + */ + public HTTPMethod method() { + return this.method; + } + + /** + * Set hTTP method. Possible values include: 'Get'. + * + * @param method the method value to set + * @return the HTTPConfiguration object itself. + */ + public HTTPConfiguration withMethod(HTTPMethod method) { + this.method = method; + return this; + } + + /** + * Get list of HTTP headers. + * + * @return the headers value + */ + public List headers() { + return this.headers; + } + + /** + * Set list of HTTP headers. + * + * @param headers the headers value to set + * @return the HTTPConfiguration object itself. + */ + public HTTPConfiguration withHeaders(List headers) { + this.headers = headers; + return this; + } + + /** + * Get valid status codes. + * + * @return the validStatusCodes value + */ + public List validStatusCodes() { + return this.validStatusCodes; + } + + /** + * Set valid status codes. + * + * @param validStatusCodes the validStatusCodes value to set + * @return the HTTPConfiguration object itself. + */ + public HTTPConfiguration withValidStatusCodes(List validStatusCodes) { + this.validStatusCodes = validStatusCodes; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/HTTPHeader.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/HTTPHeader.java new file mode 100644 index 00000000000..ad4f438b5ad --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/HTTPHeader.java @@ -0,0 +1,69 @@ +/** + * 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.network; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes the HTTP header. + */ +public class HTTPHeader { + /** + * The name in HTTP header. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The value in HTTP header. + */ + @JsonProperty(value = "value") + private String value; + + /** + * Get the name in HTTP header. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name in HTTP header. + * + * @param name the name value to set + * @return the HTTPHeader object itself. + */ + public HTTPHeader withName(String name) { + this.name = name; + return this; + } + + /** + * Get the value in HTTP header. + * + * @return the value value + */ + public String value() { + return this.value; + } + + /** + * Set the value in HTTP header. + * + * @param value the value value to set + * @return the HTTPHeader object itself. + */ + public HTTPHeader withValue(String value) { + this.value = value; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/HTTPMethod.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/HTTPMethod.java new file mode 100644 index 00000000000..9abed6928c4 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/HTTPMethod.java @@ -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.network; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for HTTPMethod. + */ +public final class HTTPMethod extends ExpandableStringEnum { + /** Static value Get for HTTPMethod. */ + public static final HTTPMethod GET = fromString("Get"); + + /** + * Creates or finds a HTTPMethod from its string representation. + * @param name a name to look for + * @return the corresponding HTTPMethod + */ + @JsonCreator + public static HTTPMethod fromString(String name) { + return fromString(name, HTTPMethod.class); + } + + /** + * @return known HTTPMethod values + */ + public static Collection values() { + return values(HTTPMethod.class); + } +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/HttpConfiguration.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/HttpConfiguration.java new file mode 100644 index 00000000000..26085b1534f --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/HttpConfiguration.java @@ -0,0 +1,96 @@ +/** + * 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.network; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * HTTP configuration of the connectivity check. + */ +public class HttpConfiguration { + /** + * HTTP method. Possible values include: 'Get'. + */ + @JsonProperty(value = "method") + private HTTPMethod method; + + /** + * List of HTTP headers. + */ + @JsonProperty(value = "headers") + private List headers; + + /** + * Valid status codes. + */ + @JsonProperty(value = "validStatusCodes") + private List validStatusCodes; + + /** + * Get the method value. + * + * @return the method value + */ + public HTTPMethod method() { + return this.method; + } + + /** + * Set the method value. + * + * @param method the method value to set + * @return the HttpConfiguration object itself. + */ + public HttpConfiguration withMethod(HTTPMethod method) { + this.method = method; + return this; + } + + /** + * Get the headers value. + * + * @return the headers value + */ + public List headers() { + return this.headers; + } + + /** + * Set the headers value. + * + * @param headers the headers value to set + * @return the HttpConfiguration object itself. + */ + public HttpConfiguration withHeaders(List headers) { + this.headers = headers; + return this; + } + + /** + * Get the validStatusCodes value. + * + * @return the validStatusCodes value + */ + public List validStatusCodes() { + return this.validStatusCodes; + } + + /** + * Set the validStatusCodes value. + * + * @param validStatusCodes the validStatusCodes value to set + * @return the HttpConfiguration object itself. + */ + public HttpConfiguration withValidStatusCodes(List validStatusCodes) { + this.validStatusCodes = validStatusCodes; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IPAllocationMethod.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IPAllocationMethod.java index eae50093aac..139bb73cd1d 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IPAllocationMethod.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IPAllocationMethod.java @@ -8,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for IPAllocationMethod. */ -public final class IPAllocationMethod { +public final class IPAllocationMethod extends ExpandableStringEnum { /** Static value Static for IPAllocationMethod. */ - public static final IPAllocationMethod STATIC = new IPAllocationMethod("Static"); + public static final IPAllocationMethod STATIC = fromString("Static"); /** Static value Dynamic for IPAllocationMethod. */ - public static final IPAllocationMethod DYNAMIC = new IPAllocationMethod("Dynamic"); - - private String value; + public static final IPAllocationMethod DYNAMIC = fromString("Dynamic"); /** - * Creates a custom value for IPAllocationMethod. - * @param value the custom value + * Creates or finds a IPAllocationMethod from its string representation. + * @param name a name to look for + * @return the corresponding IPAllocationMethod */ - public IPAllocationMethod(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static IPAllocationMethod fromString(String name) { + return fromString(name, IPAllocationMethod.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof IPAllocationMethod)) { - return false; - } - if (obj == this) { - return true; - } - IPAllocationMethod rhs = (IPAllocationMethod) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known IPAllocationMethod values + */ + public static Collection values() { + return values(IPAllocationMethod.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IPVersion.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IPVersion.java index 0afc2e2a7e0..0cb7b82f33f 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IPVersion.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IPVersion.java @@ -8,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for IPVersion. */ -public final class IPVersion { +public final class IPVersion extends ExpandableStringEnum { /** Static value IPv4 for IPVersion. */ - public static final IPVersion IPV4 = new IPVersion("IPv4"); + public static final IPVersion IPV4 = fromString("IPv4"); /** Static value IPv6 for IPVersion. */ - public static final IPVersion IPV6 = new IPVersion("IPv6"); - - private String value; + public static final IPVersion IPV6 = fromString("IPv6"); /** - * Creates a custom value for IPVersion. - * @param value the custom value + * Creates or finds a IPVersion from its string representation. + * @param name a name to look for + * @return the corresponding IPVersion */ - public IPVersion(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static IPVersion fromString(String name) { + return fromString(name, IPVersion.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof IPVersion)) { - return false; - } - if (obj == this) { - return true; - } - IPVersion rhs = (IPVersion) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known IPVersion values + */ + public static Collection values() { + return values(IPVersion.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IkeEncryption.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IkeEncryption.java index 94372a5a6c7..b55ccce065d 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IkeEncryption.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IkeEncryption.java @@ -8,61 +8,49 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for IkeEncryption. */ -public final class IkeEncryption { +public final class IkeEncryption extends ExpandableStringEnum { /** Static value DES for IkeEncryption. */ - public static final IkeEncryption DES = new IkeEncryption("DES"); + public static final IkeEncryption DES = fromString("DES"); /** Static value DES3 for IkeEncryption. */ - public static final IkeEncryption DES3 = new IkeEncryption("DES3"); + public static final IkeEncryption DES3 = fromString("DES3"); /** Static value AES128 for IkeEncryption. */ - public static final IkeEncryption AES128 = new IkeEncryption("AES128"); + public static final IkeEncryption AES128 = fromString("AES128"); /** Static value AES192 for IkeEncryption. */ - public static final IkeEncryption AES192 = new IkeEncryption("AES192"); + public static final IkeEncryption AES192 = fromString("AES192"); /** Static value AES256 for IkeEncryption. */ - public static final IkeEncryption AES256 = new IkeEncryption("AES256"); + public static final IkeEncryption AES256 = fromString("AES256"); - private String value; + /** Static value GCMAES256 for IkeEncryption. */ + public static final IkeEncryption GCMAES256 = fromString("GCMAES256"); + + /** Static value GCMAES128 for IkeEncryption. */ + public static final IkeEncryption GCMAES128 = fromString("GCMAES128"); /** - * Creates a custom value for IkeEncryption. - * @param value the custom value + * Creates or finds a IkeEncryption from its string representation. + * @param name a name to look for + * @return the corresponding IkeEncryption */ - public IkeEncryption(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static IkeEncryption fromString(String name) { + return fromString(name, IkeEncryption.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof IkeEncryption)) { - return false; - } - if (obj == this) { - return true; - } - IkeEncryption rhs = (IkeEncryption) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known IkeEncryption values + */ + public static Collection values() { + return values(IkeEncryption.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IkeIntegrity.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IkeIntegrity.java index 5b6941ed0b0..6b3670c4f21 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IkeIntegrity.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IkeIntegrity.java @@ -8,58 +8,46 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for IkeIntegrity. */ -public final class IkeIntegrity { +public final class IkeIntegrity extends ExpandableStringEnum { /** Static value MD5 for IkeIntegrity. */ - public static final IkeIntegrity MD5 = new IkeIntegrity("MD5"); + public static final IkeIntegrity MD5 = fromString("MD5"); /** Static value SHA1 for IkeIntegrity. */ - public static final IkeIntegrity SHA1 = new IkeIntegrity("SHA1"); + public static final IkeIntegrity SHA1 = fromString("SHA1"); /** Static value SHA256 for IkeIntegrity. */ - public static final IkeIntegrity SHA256 = new IkeIntegrity("SHA256"); + public static final IkeIntegrity SHA256 = fromString("SHA256"); /** Static value SHA384 for IkeIntegrity. */ - public static final IkeIntegrity SHA384 = new IkeIntegrity("SHA384"); + public static final IkeIntegrity SHA384 = fromString("SHA384"); - private String value; + /** Static value GCMAES256 for IkeIntegrity. */ + public static final IkeIntegrity GCMAES256 = fromString("GCMAES256"); + + /** Static value GCMAES128 for IkeIntegrity. */ + public static final IkeIntegrity GCMAES128 = fromString("GCMAES128"); /** - * Creates a custom value for IkeIntegrity. - * @param value the custom value + * Creates or finds a IkeIntegrity from its string representation. + * @param name a name to look for + * @return the corresponding IkeIntegrity */ - public IkeIntegrity(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static IkeIntegrity fromString(String name) { + return fromString(name, IkeIntegrity.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof IkeIntegrity)) { - return false; - } - if (obj == this) { - return true; - } - IkeIntegrity rhs = (IkeIntegrity) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known IkeIntegrity values + */ + public static Collection values() { + return values(IkeIntegrity.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IpFlowProtocol.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IpFlowProtocol.java new file mode 100644 index 00000000000..a860d8bb5e3 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IpFlowProtocol.java @@ -0,0 +1,41 @@ +/** + * 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.network; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for IpFlowProtocol. + */ +public final class IpFlowProtocol extends ExpandableStringEnum { + /** Static value TCP for IpFlowProtocol. */ + public static final IpFlowProtocol TCP = fromString("TCP"); + + /** Static value UDP for IpFlowProtocol. */ + public static final IpFlowProtocol UDP = fromString("UDP"); + + /** + * Creates or finds a IpFlowProtocol from its string representation. + * @param name a name to look for + * @return the corresponding IpFlowProtocol + */ + @JsonCreator + public static IpFlowProtocol fromString(String name) { + return fromString(name, IpFlowProtocol.class); + } + + /** + * @return known IpFlowProtocol values + */ + public static Collection values() { + return values(IpFlowProtocol.class); + } +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IpTag.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IpTag.java new file mode 100644 index 00000000000..fc835c2d0c8 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IpTag.java @@ -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.network; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Contains the IpTag associated with the public IP address. + */ +public class IpTag { + /** + * Gets or sets the ipTag type: Example FirstPartyUsage. + */ + @JsonProperty(value = "ipTagType") + private String ipTagType; + + /** + * Gets or sets value of the IpTag associated with the public IP. Example + * SQL, Storage etc. + */ + @JsonProperty(value = "tag") + private String tag; + + /** + * Get gets or sets the ipTag type: Example FirstPartyUsage. + * + * @return the ipTagType value + */ + public String ipTagType() { + return this.ipTagType; + } + + /** + * Set gets or sets the ipTag type: Example FirstPartyUsage. + * + * @param ipTagType the ipTagType value to set + * @return the IpTag object itself. + */ + public IpTag withIpTagType(String ipTagType) { + this.ipTagType = ipTagType; + return this; + } + + /** + * Get gets or sets value of the IpTag associated with the public IP. Example SQL, Storage etc. + * + * @return the tag value + */ + public String tag() { + return this.tag; + } + + /** + * Set gets or sets value of the IpTag associated with the public IP. Example SQL, Storage etc. + * + * @param tag the tag value to set + * @return the IpTag object itself. + */ + public IpTag withTag(String tag) { + this.tag = tag; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IpsecEncryption.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IpsecEncryption.java index da9af5b5a4c..cd624bf0332 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IpsecEncryption.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IpsecEncryption.java @@ -8,73 +8,55 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for IpsecEncryption. */ -public final class IpsecEncryption { +public final class IpsecEncryption extends ExpandableStringEnum { /** Static value None for IpsecEncryption. */ - public static final IpsecEncryption NONE = new IpsecEncryption("None"); + public static final IpsecEncryption NONE = fromString("None"); /** Static value DES for IpsecEncryption. */ - public static final IpsecEncryption DES = new IpsecEncryption("DES"); + public static final IpsecEncryption DES = fromString("DES"); /** Static value DES3 for IpsecEncryption. */ - public static final IpsecEncryption DES3 = new IpsecEncryption("DES3"); + public static final IpsecEncryption DES3 = fromString("DES3"); /** Static value AES128 for IpsecEncryption. */ - public static final IpsecEncryption AES128 = new IpsecEncryption("AES128"); + public static final IpsecEncryption AES128 = fromString("AES128"); /** Static value AES192 for IpsecEncryption. */ - public static final IpsecEncryption AES192 = new IpsecEncryption("AES192"); + public static final IpsecEncryption AES192 = fromString("AES192"); /** Static value AES256 for IpsecEncryption. */ - public static final IpsecEncryption AES256 = new IpsecEncryption("AES256"); + public static final IpsecEncryption AES256 = fromString("AES256"); /** Static value GCMAES128 for IpsecEncryption. */ - public static final IpsecEncryption GCMAES128 = new IpsecEncryption("GCMAES128"); + public static final IpsecEncryption GCMAES128 = fromString("GCMAES128"); /** Static value GCMAES192 for IpsecEncryption. */ - public static final IpsecEncryption GCMAES192 = new IpsecEncryption("GCMAES192"); + public static final IpsecEncryption GCMAES192 = fromString("GCMAES192"); /** Static value GCMAES256 for IpsecEncryption. */ - public static final IpsecEncryption GCMAES256 = new IpsecEncryption("GCMAES256"); - - private String value; + public static final IpsecEncryption GCMAES256 = fromString("GCMAES256"); /** - * Creates a custom value for IpsecEncryption. - * @param value the custom value + * Creates or finds a IpsecEncryption from its string representation. + * @param name a name to look for + * @return the corresponding IpsecEncryption */ - public IpsecEncryption(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static IpsecEncryption fromString(String name) { + return fromString(name, IpsecEncryption.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof IpsecEncryption)) { - return false; - } - if (obj == this) { - return true; - } - IpsecEncryption rhs = (IpsecEncryption) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known IpsecEncryption values + */ + public static Collection values() { + return values(IpsecEncryption.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IpsecIntegrity.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IpsecIntegrity.java index 59a97cceec5..a7685667a32 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IpsecIntegrity.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IpsecIntegrity.java @@ -8,64 +8,46 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for IpsecIntegrity. */ -public final class IpsecIntegrity { +public final class IpsecIntegrity extends ExpandableStringEnum { /** Static value MD5 for IpsecIntegrity. */ - public static final IpsecIntegrity MD5 = new IpsecIntegrity("MD5"); + public static final IpsecIntegrity MD5 = fromString("MD5"); /** Static value SHA1 for IpsecIntegrity. */ - public static final IpsecIntegrity SHA1 = new IpsecIntegrity("SHA1"); + public static final IpsecIntegrity SHA1 = fromString("SHA1"); /** Static value SHA256 for IpsecIntegrity. */ - public static final IpsecIntegrity SHA256 = new IpsecIntegrity("SHA256"); + public static final IpsecIntegrity SHA256 = fromString("SHA256"); /** Static value GCMAES128 for IpsecIntegrity. */ - public static final IpsecIntegrity GCMAES128 = new IpsecIntegrity("GCMAES128"); + public static final IpsecIntegrity GCMAES128 = fromString("GCMAES128"); /** Static value GCMAES192 for IpsecIntegrity. */ - public static final IpsecIntegrity GCMAES192 = new IpsecIntegrity("GCMAES192"); + public static final IpsecIntegrity GCMAES192 = fromString("GCMAES192"); /** Static value GCMAES256 for IpsecIntegrity. */ - public static final IpsecIntegrity GCMAES256 = new IpsecIntegrity("GCMAES256"); - - private String value; + public static final IpsecIntegrity GCMAES256 = fromString("GCMAES256"); /** - * Creates a custom value for IpsecIntegrity. - * @param value the custom value + * Creates or finds a IpsecIntegrity from its string representation. + * @param name a name to look for + * @return the corresponding IpsecIntegrity */ - public IpsecIntegrity(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static IpsecIntegrity fromString(String name) { + return fromString(name, IpsecIntegrity.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof IpsecIntegrity)) { - return false; - } - if (obj == this) { - return true; - } - IpsecIntegrity rhs = (IpsecIntegrity) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known IpsecIntegrity values + */ + public static Collection values() { + return values(IpsecIntegrity.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IpsecPolicy.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IpsecPolicy.java index 1d82ea634f0..b7cfa51f4a0 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IpsecPolicy.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IpsecPolicy.java @@ -45,14 +45,14 @@ public class IpsecPolicy { /** * The IKE encryption algorithm (IKE phase 2). Possible values include: - * 'DES', 'DES3', 'AES128', 'AES192', 'AES256'. + * 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'. */ @JsonProperty(value = "ikeEncryption", required = true) private IkeEncryption ikeEncryption; /** * The IKE integrity algorithm (IKE phase 2). Possible values include: - * 'MD5', 'SHA1', 'SHA256', 'SHA384'. + * 'MD5', 'SHA1', 'SHA256', 'SHA384', 'GCMAES256', 'GCMAES128'. */ @JsonProperty(value = "ikeIntegrity", required = true) private IkeIntegrity ikeIntegrity; @@ -66,14 +66,15 @@ public class IpsecPolicy { private DhGroup dhGroup; /** - * The DH Groups used in IKE Phase 2 for new child SA. Possible values - * include: 'None', 'PFS1', 'PFS2', 'PFS2048', 'ECP256', 'ECP384', 'PFS24'. + * The Pfs Groups used in IKE Phase 2 for new child SA. Possible values + * include: 'None', 'PFS1', 'PFS2', 'PFS2048', 'ECP256', 'ECP384', 'PFS24', + * 'PFS14', 'PFSMM'. */ @JsonProperty(value = "pfsGroup", required = true) private PfsGroup pfsGroup; /** - * Get the saLifeTimeSeconds value. + * Get the IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel. * * @return the saLifeTimeSeconds value */ @@ -82,7 +83,7 @@ public int saLifeTimeSeconds() { } /** - * Set the saLifeTimeSeconds value. + * Set the IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel. * * @param saLifeTimeSeconds the saLifeTimeSeconds value to set * @return the IpsecPolicy object itself. @@ -93,7 +94,7 @@ public IpsecPolicy withSaLifeTimeSeconds(int saLifeTimeSeconds) { } /** - * Get the saDataSizeKilobytes value. + * Get the IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel. * * @return the saDataSizeKilobytes value */ @@ -102,7 +103,7 @@ public int saDataSizeKilobytes() { } /** - * Set the saDataSizeKilobytes value. + * Set the IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel. * * @param saDataSizeKilobytes the saDataSizeKilobytes value to set * @return the IpsecPolicy object itself. @@ -113,7 +114,7 @@ public IpsecPolicy withSaDataSizeKilobytes(int saDataSizeKilobytes) { } /** - * Get the ipsecEncryption value. + * Get the IPSec encryption algorithm (IKE phase 1). Possible values include: 'None', 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES128', 'GCMAES192', 'GCMAES256'. * * @return the ipsecEncryption value */ @@ -122,7 +123,7 @@ public IpsecEncryption ipsecEncryption() { } /** - * Set the ipsecEncryption value. + * Set the IPSec encryption algorithm (IKE phase 1). Possible values include: 'None', 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES128', 'GCMAES192', 'GCMAES256'. * * @param ipsecEncryption the ipsecEncryption value to set * @return the IpsecPolicy object itself. @@ -133,7 +134,7 @@ public IpsecPolicy withIpsecEncryption(IpsecEncryption ipsecEncryption) { } /** - * Get the ipsecIntegrity value. + * Get the IPSec integrity algorithm (IKE phase 1). Possible values include: 'MD5', 'SHA1', 'SHA256', 'GCMAES128', 'GCMAES192', 'GCMAES256'. * * @return the ipsecIntegrity value */ @@ -142,7 +143,7 @@ public IpsecIntegrity ipsecIntegrity() { } /** - * Set the ipsecIntegrity value. + * Set the IPSec integrity algorithm (IKE phase 1). Possible values include: 'MD5', 'SHA1', 'SHA256', 'GCMAES128', 'GCMAES192', 'GCMAES256'. * * @param ipsecIntegrity the ipsecIntegrity value to set * @return the IpsecPolicy object itself. @@ -153,7 +154,7 @@ public IpsecPolicy withIpsecIntegrity(IpsecIntegrity ipsecIntegrity) { } /** - * Get the ikeEncryption value. + * Get the IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'. * * @return the ikeEncryption value */ @@ -162,7 +163,7 @@ public IkeEncryption ikeEncryption() { } /** - * Set the ikeEncryption value. + * Set the IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'. * * @param ikeEncryption the ikeEncryption value to set * @return the IpsecPolicy object itself. @@ -173,7 +174,7 @@ public IpsecPolicy withIkeEncryption(IkeEncryption ikeEncryption) { } /** - * Get the ikeIntegrity value. + * Get the IKE integrity algorithm (IKE phase 2). Possible values include: 'MD5', 'SHA1', 'SHA256', 'SHA384', 'GCMAES256', 'GCMAES128'. * * @return the ikeIntegrity value */ @@ -182,7 +183,7 @@ public IkeIntegrity ikeIntegrity() { } /** - * Set the ikeIntegrity value. + * Set the IKE integrity algorithm (IKE phase 2). Possible values include: 'MD5', 'SHA1', 'SHA256', 'SHA384', 'GCMAES256', 'GCMAES128'. * * @param ikeIntegrity the ikeIntegrity value to set * @return the IpsecPolicy object itself. @@ -193,7 +194,7 @@ public IpsecPolicy withIkeIntegrity(IkeIntegrity ikeIntegrity) { } /** - * Get the dhGroup value. + * Get the DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'. * * @return the dhGroup value */ @@ -202,7 +203,7 @@ public DhGroup dhGroup() { } /** - * Set the dhGroup value. + * Set the DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'. * * @param dhGroup the dhGroup value to set * @return the IpsecPolicy object itself. @@ -213,7 +214,7 @@ public IpsecPolicy withDhGroup(DhGroup dhGroup) { } /** - * Get the pfsGroup value. + * Get the Pfs Groups used in IKE Phase 2 for new child SA. Possible values include: 'None', 'PFS1', 'PFS2', 'PFS2048', 'ECP256', 'ECP384', 'PFS24', 'PFS14', 'PFSMM'. * * @return the pfsGroup value */ @@ -222,7 +223,7 @@ public PfsGroup pfsGroup() { } /** - * Set the pfsGroup value. + * Set the Pfs Groups used in IKE Phase 2 for new child SA. Possible values include: 'None', 'PFS1', 'PFS2', 'PFS2048', 'ECP256', 'ECP384', 'PFS24', 'PFS14', 'PFSMM'. * * @param pfsGroup the pfsGroup value to set * @return the IpsecPolicy object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Ipv6ExpressRouteCircuitPeeringConfig.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Ipv6ExpressRouteCircuitPeeringConfig.java index 3b54a3f5533..e907f3f98c6 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Ipv6ExpressRouteCircuitPeeringConfig.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Ipv6ExpressRouteCircuitPeeringConfig.java @@ -47,7 +47,7 @@ public class Ipv6ExpressRouteCircuitPeeringConfig { private ExpressRouteCircuitPeeringState state; /** - * Get the primaryPeerAddressPrefix value. + * Get the primary address prefix. * * @return the primaryPeerAddressPrefix value */ @@ -56,7 +56,7 @@ public String primaryPeerAddressPrefix() { } /** - * Set the primaryPeerAddressPrefix value. + * Set the primary address prefix. * * @param primaryPeerAddressPrefix the primaryPeerAddressPrefix value to set * @return the Ipv6ExpressRouteCircuitPeeringConfig object itself. @@ -67,7 +67,7 @@ public Ipv6ExpressRouteCircuitPeeringConfig withPrimaryPeerAddressPrefix(String } /** - * Get the secondaryPeerAddressPrefix value. + * Get the secondary address prefix. * * @return the secondaryPeerAddressPrefix value */ @@ -76,7 +76,7 @@ public String secondaryPeerAddressPrefix() { } /** - * Set the secondaryPeerAddressPrefix value. + * Set the secondary address prefix. * * @param secondaryPeerAddressPrefix the secondaryPeerAddressPrefix value to set * @return the Ipv6ExpressRouteCircuitPeeringConfig object itself. @@ -87,7 +87,7 @@ public Ipv6ExpressRouteCircuitPeeringConfig withSecondaryPeerAddressPrefix(Strin } /** - * Get the microsoftPeeringConfig value. + * Get the Microsoft peering configuration. * * @return the microsoftPeeringConfig value */ @@ -96,7 +96,7 @@ public ExpressRouteCircuitPeeringConfig microsoftPeeringConfig() { } /** - * Set the microsoftPeeringConfig value. + * Set the Microsoft peering configuration. * * @param microsoftPeeringConfig the microsoftPeeringConfig value to set * @return the Ipv6ExpressRouteCircuitPeeringConfig object itself. @@ -107,7 +107,7 @@ public Ipv6ExpressRouteCircuitPeeringConfig withMicrosoftPeeringConfig(ExpressRo } /** - * Get the routeFilter value. + * Get the reference of the RouteFilter resource. * * @return the routeFilter value */ @@ -116,7 +116,7 @@ public RouteFilterInner routeFilter() { } /** - * Set the routeFilter value. + * Set the reference of the RouteFilter resource. * * @param routeFilter the routeFilter value to set * @return the Ipv6ExpressRouteCircuitPeeringConfig object itself. @@ -127,7 +127,7 @@ public Ipv6ExpressRouteCircuitPeeringConfig withRouteFilter(RouteFilterInner rou } /** - * Get the state value. + * Get the state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible values include: 'Disabled', 'Enabled'. * * @return the state value */ @@ -136,7 +136,7 @@ public ExpressRouteCircuitPeeringState state() { } /** - * Set the state value. + * Set the state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible values include: 'Disabled', 'Enabled'. * * @param state the state value to set * @return the Ipv6ExpressRouteCircuitPeeringConfig object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IssueType.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IssueType.java index dd17c448703..53b744deb8e 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IssueType.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IssueType.java @@ -8,73 +8,55 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for IssueType. */ -public final class IssueType { +public final class IssueType extends ExpandableStringEnum { /** Static value Unknown for IssueType. */ - public static final IssueType UNKNOWN = new IssueType("Unknown"); + public static final IssueType UNKNOWN = fromString("Unknown"); /** Static value AgentStopped for IssueType. */ - public static final IssueType AGENT_STOPPED = new IssueType("AgentStopped"); + public static final IssueType AGENT_STOPPED = fromString("AgentStopped"); /** Static value GuestFirewall for IssueType. */ - public static final IssueType GUEST_FIREWALL = new IssueType("GuestFirewall"); + public static final IssueType GUEST_FIREWALL = fromString("GuestFirewall"); /** Static value DnsResolution for IssueType. */ - public static final IssueType DNS_RESOLUTION = new IssueType("DnsResolution"); + public static final IssueType DNS_RESOLUTION = fromString("DnsResolution"); /** Static value SocketBind for IssueType. */ - public static final IssueType SOCKET_BIND = new IssueType("SocketBind"); + public static final IssueType SOCKET_BIND = fromString("SocketBind"); /** Static value NetworkSecurityRule for IssueType. */ - public static final IssueType NETWORK_SECURITY_RULE = new IssueType("NetworkSecurityRule"); + public static final IssueType NETWORK_SECURITY_RULE = fromString("NetworkSecurityRule"); /** Static value UserDefinedRoute for IssueType. */ - public static final IssueType USER_DEFINED_ROUTE = new IssueType("UserDefinedRoute"); + public static final IssueType USER_DEFINED_ROUTE = fromString("UserDefinedRoute"); /** Static value PortThrottled for IssueType. */ - public static final IssueType PORT_THROTTLED = new IssueType("PortThrottled"); + public static final IssueType PORT_THROTTLED = fromString("PortThrottled"); /** Static value Platform for IssueType. */ - public static final IssueType PLATFORM = new IssueType("Platform"); - - private String value; + public static final IssueType PLATFORM = fromString("Platform"); /** - * Creates a custom value for IssueType. - * @param value the custom value + * Creates or finds a IssueType from its string representation. + * @param name a name to look for + * @return the corresponding IssueType */ - public IssueType(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static IssueType fromString(String name) { + return fromString(name, IssueType.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof IssueType)) { - return false; - } - if (obj == this) { - return true; - } - IssueType rhs = (IssueType) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known IssueType values + */ + public static Collection values() { + return values(IssueType.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/LoadBalancerSku.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/LoadBalancerSku.java index 639c83dad64..532dceb853a 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/LoadBalancerSku.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/LoadBalancerSku.java @@ -22,7 +22,7 @@ public class LoadBalancerSku { private LoadBalancerSkuName name; /** - * Get the name value. + * Get name of a load balancer SKU. Possible values include: 'Basic', 'Standard'. * * @return the name value */ @@ -31,7 +31,7 @@ public LoadBalancerSkuName name() { } /** - * Set the name value. + * Set name of a load balancer SKU. Possible values include: 'Basic', 'Standard'. * * @param name the name value to set * @return the LoadBalancerSku object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/LoadBalancerSkuName.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/LoadBalancerSkuName.java index bd8805bb8a9..07af803b429 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/LoadBalancerSkuName.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/LoadBalancerSkuName.java @@ -8,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for LoadBalancerSkuName. */ -public final class LoadBalancerSkuName { +public final class LoadBalancerSkuName extends ExpandableStringEnum { /** Static value Basic for LoadBalancerSkuName. */ - public static final LoadBalancerSkuName BASIC = new LoadBalancerSkuName("Basic"); + public static final LoadBalancerSkuName BASIC = fromString("Basic"); /** Static value Standard for LoadBalancerSkuName. */ - public static final LoadBalancerSkuName STANDARD = new LoadBalancerSkuName("Standard"); - - private String value; + public static final LoadBalancerSkuName STANDARD = fromString("Standard"); /** - * Creates a custom value for LoadBalancerSkuName. - * @param value the custom value + * Creates or finds a LoadBalancerSkuName from its string representation. + * @param name a name to look for + * @return the corresponding LoadBalancerSkuName */ - public LoadBalancerSkuName(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static LoadBalancerSkuName fromString(String name) { + return fromString(name, LoadBalancerSkuName.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof LoadBalancerSkuName)) { - return false; - } - if (obj == this) { - return true; - } - LoadBalancerSkuName rhs = (LoadBalancerSkuName) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known LoadBalancerSkuName values + */ + public static Collection values() { + return values(LoadBalancerSkuName.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/LoadDistribution.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/LoadDistribution.java index 7c35ba2a4eb..a05f626404f 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/LoadDistribution.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/LoadDistribution.java @@ -8,55 +8,37 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for LoadDistribution. */ -public final class LoadDistribution { +public final class LoadDistribution extends ExpandableStringEnum { /** Static value Default for LoadDistribution. */ - public static final LoadDistribution DEFAULT = new LoadDistribution("Default"); + public static final LoadDistribution DEFAULT = fromString("Default"); /** Static value SourceIP for LoadDistribution. */ - public static final LoadDistribution SOURCE_IP = new LoadDistribution("SourceIP"); + public static final LoadDistribution SOURCE_IP = fromString("SourceIP"); /** Static value SourceIPProtocol for LoadDistribution. */ - public static final LoadDistribution SOURCE_IPPROTOCOL = new LoadDistribution("SourceIPProtocol"); - - private String value; + public static final LoadDistribution SOURCE_IPPROTOCOL = fromString("SourceIPProtocol"); /** - * Creates a custom value for LoadDistribution. - * @param value the custom value + * Creates or finds a LoadDistribution from its string representation. + * @param name a name to look for + * @return the corresponding LoadDistribution */ - public LoadDistribution(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static LoadDistribution fromString(String name) { + return fromString(name, LoadDistribution.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof LoadDistribution)) { - return false; - } - if (obj == this) { - return true; - } - LoadDistribution rhs = (LoadDistribution) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known LoadDistribution values + */ + public static Collection values() { + return values(LoadDistribution.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/LogSpecification.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/LogSpecification.java new file mode 100644 index 00000000000..6fbef6fa66b --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/LogSpecification.java @@ -0,0 +1,95 @@ +/** + * 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.network; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Description of logging specification. + */ +public class LogSpecification { + /** + * The name of the specification. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The display name of the specification. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /** + * Duration of the blob. + */ + @JsonProperty(value = "blobDuration") + private String blobDuration; + + /** + * Get the name of the specification. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the specification. + * + * @param name the name value to set + * @return the LogSpecification object itself. + */ + public LogSpecification withName(String name) { + this.name = name; + return this; + } + + /** + * Get the display name of the specification. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the display name of the specification. + * + * @param displayName the displayName value to set + * @return the LogSpecification object itself. + */ + public LogSpecification withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get duration of the blob. + * + * @return the blobDuration value + */ + public String blobDuration() { + return this.blobDuration; + } + + /** + * Set duration of the blob. + * + * @param blobDuration the blobDuration value to set + * @return the LogSpecification object itself. + */ + public LogSpecification withBlobDuration(String blobDuration) { + this.blobDuration = blobDuration; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/MetricSpecification.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/MetricSpecification.java new file mode 100644 index 00000000000..af88220d12a --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/MetricSpecification.java @@ -0,0 +1,382 @@ +/** + * 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.network; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Description of metrics specification. + */ +public class MetricSpecification { + /** + * The name of the metric. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The display name of the metric. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /** + * The description of the metric. + */ + @JsonProperty(value = "displayDescription") + private String displayDescription; + + /** + * Units the metric to be displayed in. + */ + @JsonProperty(value = "unit") + private String unit; + + /** + * The aggregation type. + */ + @JsonProperty(value = "aggregationType") + private String aggregationType; + + /** + * List of availability. + */ + @JsonProperty(value = "availabilities") + private List availabilities; + + /** + * Whether regional MDM account enabled. + */ + @JsonProperty(value = "enableRegionalMdmAccount") + private Boolean enableRegionalMdmAccount; + + /** + * Whether gaps would be filled with zeros. + */ + @JsonProperty(value = "fillGapWithZero") + private Boolean fillGapWithZero; + + /** + * Pattern for the filter of the metric. + */ + @JsonProperty(value = "metricFilterPattern") + private String metricFilterPattern; + + /** + * List of dimensions. + */ + @JsonProperty(value = "dimensions") + private List dimensions; + + /** + * Whether the metric is internal. + */ + @JsonProperty(value = "isInternal") + private Boolean isInternal; + + /** + * The source MDM account. + */ + @JsonProperty(value = "sourceMdmAccount") + private String sourceMdmAccount; + + /** + * The source MDM namespace. + */ + @JsonProperty(value = "sourceMdmNamespace") + private String sourceMdmNamespace; + + /** + * The resource Id dimension name override. + */ + @JsonProperty(value = "resourceIdDimensionNameOverride") + private String resourceIdDimensionNameOverride; + + /** + * Get the name of the metric. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the metric. + * + * @param name the name value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withName(String name) { + this.name = name; + return this; + } + + /** + * Get the display name of the metric. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the display name of the metric. + * + * @param displayName the displayName value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the description of the metric. + * + * @return the displayDescription value + */ + public String displayDescription() { + return this.displayDescription; + } + + /** + * Set the description of the metric. + * + * @param displayDescription the displayDescription value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withDisplayDescription(String displayDescription) { + this.displayDescription = displayDescription; + return this; + } + + /** + * Get units the metric to be displayed in. + * + * @return the unit value + */ + public String unit() { + return this.unit; + } + + /** + * Set units the metric to be displayed in. + * + * @param unit the unit value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withUnit(String unit) { + this.unit = unit; + return this; + } + + /** + * Get the aggregation type. + * + * @return the aggregationType value + */ + public String aggregationType() { + return this.aggregationType; + } + + /** + * Set the aggregation type. + * + * @param aggregationType the aggregationType value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withAggregationType(String aggregationType) { + this.aggregationType = aggregationType; + return this; + } + + /** + * Get list of availability. + * + * @return the availabilities value + */ + public List availabilities() { + return this.availabilities; + } + + /** + * Set list of availability. + * + * @param availabilities the availabilities value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withAvailabilities(List availabilities) { + this.availabilities = availabilities; + return this; + } + + /** + * Get whether regional MDM account enabled. + * + * @return the enableRegionalMdmAccount value + */ + public Boolean enableRegionalMdmAccount() { + return this.enableRegionalMdmAccount; + } + + /** + * Set whether regional MDM account enabled. + * + * @param enableRegionalMdmAccount the enableRegionalMdmAccount value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withEnableRegionalMdmAccount(Boolean enableRegionalMdmAccount) { + this.enableRegionalMdmAccount = enableRegionalMdmAccount; + return this; + } + + /** + * Get whether gaps would be filled with zeros. + * + * @return the fillGapWithZero value + */ + public Boolean fillGapWithZero() { + return this.fillGapWithZero; + } + + /** + * Set whether gaps would be filled with zeros. + * + * @param fillGapWithZero the fillGapWithZero value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withFillGapWithZero(Boolean fillGapWithZero) { + this.fillGapWithZero = fillGapWithZero; + return this; + } + + /** + * Get pattern for the filter of the metric. + * + * @return the metricFilterPattern value + */ + public String metricFilterPattern() { + return this.metricFilterPattern; + } + + /** + * Set pattern for the filter of the metric. + * + * @param metricFilterPattern the metricFilterPattern value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withMetricFilterPattern(String metricFilterPattern) { + this.metricFilterPattern = metricFilterPattern; + return this; + } + + /** + * Get list of dimensions. + * + * @return the dimensions value + */ + public List dimensions() { + return this.dimensions; + } + + /** + * Set list of dimensions. + * + * @param dimensions the dimensions value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withDimensions(List dimensions) { + this.dimensions = dimensions; + return this; + } + + /** + * Get whether the metric is internal. + * + * @return the isInternal value + */ + public Boolean isInternal() { + return this.isInternal; + } + + /** + * Set whether the metric is internal. + * + * @param isInternal the isInternal value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withIsInternal(Boolean isInternal) { + this.isInternal = isInternal; + return this; + } + + /** + * Get the source MDM account. + * + * @return the sourceMdmAccount value + */ + public String sourceMdmAccount() { + return this.sourceMdmAccount; + } + + /** + * Set the source MDM account. + * + * @param sourceMdmAccount the sourceMdmAccount value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withSourceMdmAccount(String sourceMdmAccount) { + this.sourceMdmAccount = sourceMdmAccount; + return this; + } + + /** + * Get the source MDM namespace. + * + * @return the sourceMdmNamespace value + */ + public String sourceMdmNamespace() { + return this.sourceMdmNamespace; + } + + /** + * Set the source MDM namespace. + * + * @param sourceMdmNamespace the sourceMdmNamespace value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withSourceMdmNamespace(String sourceMdmNamespace) { + this.sourceMdmNamespace = sourceMdmNamespace; + return this; + } + + /** + * Get the resource Id dimension name override. + * + * @return the resourceIdDimensionNameOverride value + */ + public String resourceIdDimensionNameOverride() { + return this.resourceIdDimensionNameOverride; + } + + /** + * Set the resource Id dimension name override. + * + * @param resourceIdDimensionNameOverride the resourceIdDimensionNameOverride value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withResourceIdDimensionNameOverride(String resourceIdDimensionNameOverride) { + this.resourceIdDimensionNameOverride = resourceIdDimensionNameOverride; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NetworkInterfaceAssociation.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NetworkInterfaceAssociation.java index d2bdf3cf684..752383655e8 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NetworkInterfaceAssociation.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NetworkInterfaceAssociation.java @@ -29,7 +29,7 @@ public class NetworkInterfaceAssociation { private List securityRules; /** - * Get the id value. + * Get network interface ID. * * @return the id value */ @@ -38,7 +38,7 @@ public String id() { } /** - * Get the securityRules value. + * Get collection of custom security rules. * * @return the securityRules value */ @@ -47,7 +47,7 @@ public List securityRules() { } /** - * Set the securityRules value. + * Set collection of custom security rules. * * @param securityRules the securityRules value to set * @return the NetworkInterfaceAssociation object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NetworkInterfaceDnsSettings.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NetworkInterfaceDnsSettings.java index fe8a1e6fc3e..954ff8c0e67 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NetworkInterfaceDnsSettings.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NetworkInterfaceDnsSettings.java @@ -56,7 +56,7 @@ public class NetworkInterfaceDnsSettings { private String internalDomainNameSuffix; /** - * Get the dnsServers value. + * Get list of DNS servers IP addresses. Use 'AzureProvidedDNS' to switch to azure provided DNS resolution. 'AzureProvidedDNS' value cannot be combined with other IPs, it must be the only value in dnsServers collection. * * @return the dnsServers value */ @@ -65,7 +65,7 @@ public List dnsServers() { } /** - * Set the dnsServers value. + * Set list of DNS servers IP addresses. Use 'AzureProvidedDNS' to switch to azure provided DNS resolution. 'AzureProvidedDNS' value cannot be combined with other IPs, it must be the only value in dnsServers collection. * * @param dnsServers the dnsServers value to set * @return the NetworkInterfaceDnsSettings object itself. @@ -76,7 +76,7 @@ public NetworkInterfaceDnsSettings withDnsServers(List dnsServers) { } /** - * Get the appliedDnsServers value. + * Get if the VM that uses this NIC is part of an Availability Set, then this list will have the union of all DNS servers from all NICs that are part of the Availability Set. This property is what is configured on each of those VMs. * * @return the appliedDnsServers value */ @@ -85,7 +85,7 @@ public List appliedDnsServers() { } /** - * Set the appliedDnsServers value. + * Set if the VM that uses this NIC is part of an Availability Set, then this list will have the union of all DNS servers from all NICs that are part of the Availability Set. This property is what is configured on each of those VMs. * * @param appliedDnsServers the appliedDnsServers value to set * @return the NetworkInterfaceDnsSettings object itself. @@ -96,7 +96,7 @@ public NetworkInterfaceDnsSettings withAppliedDnsServers(List appliedDns } /** - * Get the internalDnsNameLabel value. + * Get relative DNS name for this NIC used for internal communications between VMs in the same virtual network. * * @return the internalDnsNameLabel value */ @@ -105,7 +105,7 @@ public String internalDnsNameLabel() { } /** - * Set the internalDnsNameLabel value. + * Set relative DNS name for this NIC used for internal communications between VMs in the same virtual network. * * @param internalDnsNameLabel the internalDnsNameLabel value to set * @return the NetworkInterfaceDnsSettings object itself. @@ -116,7 +116,7 @@ public NetworkInterfaceDnsSettings withInternalDnsNameLabel(String internalDnsNa } /** - * Get the internalFqdn value. + * Get fully qualified DNS name supporting internal communications between VMs in the same virtual network. * * @return the internalFqdn value */ @@ -125,7 +125,7 @@ public String internalFqdn() { } /** - * Set the internalFqdn value. + * Set fully qualified DNS name supporting internal communications between VMs in the same virtual network. * * @param internalFqdn the internalFqdn value to set * @return the NetworkInterfaceDnsSettings object itself. @@ -136,7 +136,7 @@ public NetworkInterfaceDnsSettings withInternalFqdn(String internalFqdn) { } /** - * Get the internalDomainNameSuffix value. + * Get even if internalDnsNameLabel is not specified, a DNS entry is created for the primary NIC of the VM. This DNS name can be constructed by concatenating the VM name with the value of internalDomainNameSuffix. * * @return the internalDomainNameSuffix value */ @@ -145,7 +145,7 @@ public String internalDomainNameSuffix() { } /** - * Set the internalDomainNameSuffix value. + * Set even if internalDnsNameLabel is not specified, a DNS entry is created for the primary NIC of the VM. This DNS name can be constructed by concatenating the VM name with the value of internalDomainNameSuffix. * * @param internalDomainNameSuffix the internalDomainNameSuffix value to set * @return the NetworkInterfaceDnsSettings object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NetworkOperationStatus.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NetworkOperationStatus.java index 72ccb2233dd..e5c40e98cb5 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NetworkOperationStatus.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NetworkOperationStatus.java @@ -8,55 +8,37 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for NetworkOperationStatus. */ -public final class NetworkOperationStatus { +public final class NetworkOperationStatus extends ExpandableStringEnum { /** Static value InProgress for NetworkOperationStatus. */ - public static final NetworkOperationStatus IN_PROGRESS = new NetworkOperationStatus("InProgress"); + public static final NetworkOperationStatus IN_PROGRESS = fromString("InProgress"); /** Static value Succeeded for NetworkOperationStatus. */ - public static final NetworkOperationStatus SUCCEEDED = new NetworkOperationStatus("Succeeded"); + public static final NetworkOperationStatus SUCCEEDED = fromString("Succeeded"); /** Static value Failed for NetworkOperationStatus. */ - public static final NetworkOperationStatus FAILED = new NetworkOperationStatus("Failed"); - - private String value; + public static final NetworkOperationStatus FAILED = fromString("Failed"); /** - * Creates a custom value for NetworkOperationStatus. - * @param value the custom value + * Creates or finds a NetworkOperationStatus from its string representation. + * @param name a name to look for + * @return the corresponding NetworkOperationStatus */ - public NetworkOperationStatus(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static NetworkOperationStatus fromString(String name) { + return fromString(name, NetworkOperationStatus.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof NetworkOperationStatus)) { - return false; - } - if (obj == this) { - return true; - } - NetworkOperationStatus rhs = (NetworkOperationStatus) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known NetworkOperationStatus values + */ + public static Collection values() { + return values(NetworkOperationStatus.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NextHopParameters.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NextHopParameters.java new file mode 100644 index 00000000000..4605d92644d --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NextHopParameters.java @@ -0,0 +1,123 @@ +/** + * 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.network; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameters that define the source and destination endpoint. + */ +public class NextHopParameters { + /** + * The resource identifier of the target resource against which the action + * is to be performed. + */ + @JsonProperty(value = "targetResourceId", required = true) + private String targetResourceId; + + /** + * The source IP address. + */ + @JsonProperty(value = "sourceIPAddress", required = true) + private String sourceIPAddress; + + /** + * The destination IP address. + */ + @JsonProperty(value = "destinationIPAddress", required = true) + private String destinationIPAddress; + + /** + * The NIC ID. (If VM has multiple NICs and IP forwarding is enabled on any + * of the nics, then this parameter must be specified. Otherwise optional). + */ + @JsonProperty(value = "targetNicResourceId") + private String targetNicResourceId; + + /** + * Get the resource identifier of the target resource against which the action is to be performed. + * + * @return the targetResourceId value + */ + public String targetResourceId() { + return this.targetResourceId; + } + + /** + * Set the resource identifier of the target resource against which the action is to be performed. + * + * @param targetResourceId the targetResourceId value to set + * @return the NextHopParameters object itself. + */ + public NextHopParameters withTargetResourceId(String targetResourceId) { + this.targetResourceId = targetResourceId; + return this; + } + + /** + * Get the source IP address. + * + * @return the sourceIPAddress value + */ + public String sourceIPAddress() { + return this.sourceIPAddress; + } + + /** + * Set the source IP address. + * + * @param sourceIPAddress the sourceIPAddress value to set + * @return the NextHopParameters object itself. + */ + public NextHopParameters withSourceIPAddress(String sourceIPAddress) { + this.sourceIPAddress = sourceIPAddress; + return this; + } + + /** + * Get the destination IP address. + * + * @return the destinationIPAddress value + */ + public String destinationIPAddress() { + return this.destinationIPAddress; + } + + /** + * Set the destination IP address. + * + * @param destinationIPAddress the destinationIPAddress value to set + * @return the NextHopParameters object itself. + */ + public NextHopParameters withDestinationIPAddress(String destinationIPAddress) { + this.destinationIPAddress = destinationIPAddress; + return this; + } + + /** + * Get the NIC ID. (If VM has multiple NICs and IP forwarding is enabled on any of the nics, then this parameter must be specified. Otherwise optional). + * + * @return the targetNicResourceId value + */ + public String targetNicResourceId() { + return this.targetNicResourceId; + } + + /** + * Set the NIC ID. (If VM has multiple NICs and IP forwarding is enabled on any of the nics, then this parameter must be specified. Otherwise optional). + * + * @param targetNicResourceId the targetNicResourceId value to set + * @return the NextHopParameters object itself. + */ + public NextHopParameters withTargetNicResourceId(String targetNicResourceId) { + this.targetNicResourceId = targetNicResourceId; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NextHopType.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NextHopType.java index 72934e6b656..7dce1b03015 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NextHopType.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NextHopType.java @@ -8,64 +8,46 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for NextHopType. */ -public final class NextHopType { +public final class NextHopType extends ExpandableStringEnum { /** Static value Internet for NextHopType. */ - public static final NextHopType INTERNET = new NextHopType("Internet"); + public static final NextHopType INTERNET = fromString("Internet"); /** Static value VirtualAppliance for NextHopType. */ - public static final NextHopType VIRTUAL_APPLIANCE = new NextHopType("VirtualAppliance"); + public static final NextHopType VIRTUAL_APPLIANCE = fromString("VirtualAppliance"); /** Static value VirtualNetworkGateway for NextHopType. */ - public static final NextHopType VIRTUAL_NETWORK_GATEWAY = new NextHopType("VirtualNetworkGateway"); + public static final NextHopType VIRTUAL_NETWORK_GATEWAY = fromString("VirtualNetworkGateway"); /** Static value VnetLocal for NextHopType. */ - public static final NextHopType VNET_LOCAL = new NextHopType("VnetLocal"); + public static final NextHopType VNET_LOCAL = fromString("VnetLocal"); /** Static value HyperNetGateway for NextHopType. */ - public static final NextHopType HYPER_NET_GATEWAY = new NextHopType("HyperNetGateway"); + public static final NextHopType HYPER_NET_GATEWAY = fromString("HyperNetGateway"); /** Static value None for NextHopType. */ - public static final NextHopType NONE = new NextHopType("None"); - - private String value; + public static final NextHopType NONE = fromString("None"); /** - * Creates a custom value for NextHopType. - * @param value the custom value + * Creates or finds a NextHopType from its string representation. + * @param name a name to look for + * @return the corresponding NextHopType */ - public NextHopType(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static NextHopType fromString(String name) { + return fromString(name, NextHopType.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof NextHopType)) { - return false; - } - if (obj == this) { - return true; - } - NextHopType rhs = (NextHopType) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known NextHopType values + */ + public static Collection values() { + return values(NextHopType.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/OperationDisplay.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/OperationDisplay.java new file mode 100644 index 00000000000..4f29ce2c521 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/OperationDisplay.java @@ -0,0 +1,121 @@ +/** + * 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.network; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Display metadata associated with the operation. + */ +public class OperationDisplay { + /** + * Service provider: Microsoft Network. + */ + @JsonProperty(value = "provider") + private String provider; + + /** + * Resource on which the operation is performed. + */ + @JsonProperty(value = "resource") + private String resource; + + /** + * Type of the operation: get, read, delete, etc. + */ + @JsonProperty(value = "operation") + private String operation; + + /** + * Description of the operation. + */ + @JsonProperty(value = "description") + private String description; + + /** + * Get service provider: Microsoft Network. + * + * @return the provider value + */ + public String provider() { + return this.provider; + } + + /** + * Set service provider: Microsoft Network. + * + * @param provider the provider value to set + * @return the OperationDisplay object itself. + */ + public OperationDisplay withProvider(String provider) { + this.provider = provider; + return this; + } + + /** + * Get resource on which the operation is performed. + * + * @return the resource value + */ + public String resource() { + return this.resource; + } + + /** + * Set resource on which the operation is performed. + * + * @param resource the resource value to set + * @return the OperationDisplay object itself. + */ + public OperationDisplay withResource(String resource) { + this.resource = resource; + return this; + } + + /** + * Get type of the operation: get, read, delete, etc. + * + * @return the operation value + */ + public String operation() { + return this.operation; + } + + /** + * Set type of the operation: get, read, delete, etc. + * + * @param operation the operation value to set + * @return the OperationDisplay object itself. + */ + public OperationDisplay withOperation(String operation) { + this.operation = operation; + return this; + } + + /** + * Get description of the operation. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set description of the operation. + * + * @param description the description value to set + * @return the OperationDisplay object itself. + */ + public OperationDisplay withDescription(String description) { + this.description = description; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/OperationPropertiesFormatServiceSpecification.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/OperationPropertiesFormatServiceSpecification.java new file mode 100644 index 00000000000..5a9d95b5f8e --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/OperationPropertiesFormatServiceSpecification.java @@ -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.network; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Specification of the service. + */ +public class OperationPropertiesFormatServiceSpecification { + /** + * Operation service specification. + */ + @JsonProperty(value = "metricSpecifications") + private List metricSpecifications; + + /** + * Operation log specification. + */ + @JsonProperty(value = "logSpecifications") + private List logSpecifications; + + /** + * Get operation service specification. + * + * @return the metricSpecifications value + */ + public List metricSpecifications() { + return this.metricSpecifications; + } + + /** + * Set operation service specification. + * + * @param metricSpecifications the metricSpecifications value to set + * @return the OperationPropertiesFormatServiceSpecification object itself. + */ + public OperationPropertiesFormatServiceSpecification withMetricSpecifications(List metricSpecifications) { + this.metricSpecifications = metricSpecifications; + return this; + } + + /** + * Get operation log specification. + * + * @return the logSpecifications value + */ + public List logSpecifications() { + return this.logSpecifications; + } + + /** + * Set operation log specification. + * + * @param logSpecifications the logSpecifications value to set + * @return the OperationPropertiesFormatServiceSpecification object itself. + */ + public OperationPropertiesFormatServiceSpecification withLogSpecifications(List logSpecifications) { + this.logSpecifications = logSpecifications; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Origin.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Origin.java index db57348e220..9a8bbe337a6 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Origin.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Origin.java @@ -8,55 +8,37 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for Origin. */ -public final class Origin { +public final class Origin extends ExpandableStringEnum { /** Static value Local for Origin. */ - public static final Origin LOCAL = new Origin("Local"); + public static final Origin LOCAL = fromString("Local"); /** Static value Inbound for Origin. */ - public static final Origin INBOUND = new Origin("Inbound"); + public static final Origin INBOUND = fromString("Inbound"); /** Static value Outbound for Origin. */ - public static final Origin OUTBOUND = new Origin("Outbound"); - - private String value; + public static final Origin OUTBOUND = fromString("Outbound"); /** - * Creates a custom value for Origin. - * @param value the custom value + * Creates or finds a Origin from its string representation. + * @param name a name to look for + * @return the corresponding Origin */ - public Origin(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static Origin fromString(String name) { + return fromString(name, Origin.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof Origin)) { - return false; - } - if (obj == this) { - return true; - } - Origin rhs = (Origin) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known Origin values + */ + public static Collection values() { + return values(Origin.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PacketCaptureFilter.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PacketCaptureFilter.java index 7aee8fcfab3..a6e890eb655 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PacketCaptureFilter.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PacketCaptureFilter.java @@ -59,7 +59,7 @@ public class PacketCaptureFilter { private String remotePort; /** - * Get the protocol value. + * Get protocol to be filtered on. Possible values include: 'TCP', 'UDP', 'Any'. * * @return the protocol value */ @@ -68,7 +68,7 @@ public PcProtocol protocol() { } /** - * Set the protocol value. + * Set protocol to be filtered on. Possible values include: 'TCP', 'UDP', 'Any'. * * @param protocol the protocol value to set * @return the PacketCaptureFilter object itself. @@ -79,7 +79,7 @@ public PacketCaptureFilter withProtocol(PcProtocol protocol) { } /** - * Get the localIPAddress value. + * Get local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5"? for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. * * @return the localIPAddress value */ @@ -88,7 +88,7 @@ public String localIPAddress() { } /** - * Set the localIPAddress value. + * Set local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5"? for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. * * @param localIPAddress the localIPAddress value to set * @return the PacketCaptureFilter object itself. @@ -99,7 +99,7 @@ public PacketCaptureFilter withLocalIPAddress(String localIPAddress) { } /** - * Get the remoteIPAddress value. + * Get local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. * * @return the remoteIPAddress value */ @@ -108,7 +108,7 @@ public String remoteIPAddress() { } /** - * Set the remoteIPAddress value. + * Set local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. * * @param remoteIPAddress the remoteIPAddress value to set * @return the PacketCaptureFilter object itself. @@ -119,7 +119,7 @@ public PacketCaptureFilter withRemoteIPAddress(String remoteIPAddress) { } /** - * Get the localPort value. + * Get local port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. * * @return the localPort value */ @@ -128,7 +128,7 @@ public String localPort() { } /** - * Set the localPort value. + * Set local port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. * * @param localPort the localPort value to set * @return the PacketCaptureFilter object itself. @@ -139,7 +139,7 @@ public PacketCaptureFilter withLocalPort(String localPort) { } /** - * Get the remotePort value. + * Get remote port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. * * @return the remotePort value */ @@ -148,7 +148,7 @@ public String remotePort() { } /** - * Set the remotePort value. + * Set remote port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. * * @param remotePort the remotePort value to set * @return the PacketCaptureFilter object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PacketCaptureParameters.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PacketCaptureParameters.java index 1c67eb3be56..b337fbab0d1 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PacketCaptureParameters.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PacketCaptureParameters.java @@ -52,7 +52,7 @@ public class PacketCaptureParameters { private List filters; /** - * Get the target value. + * Get the ID of the targeted resource, only VM is currently supported. * * @return the target value */ @@ -61,7 +61,7 @@ public String target() { } /** - * Set the target value. + * Set the ID of the targeted resource, only VM is currently supported. * * @param target the target value to set * @return the PacketCaptureParameters object itself. @@ -72,7 +72,7 @@ public PacketCaptureParameters withTarget(String target) { } /** - * Get the bytesToCapturePerPacket value. + * Get number of bytes captured per packet, the remaining bytes are truncated. * * @return the bytesToCapturePerPacket value */ @@ -81,7 +81,7 @@ public Integer bytesToCapturePerPacket() { } /** - * Set the bytesToCapturePerPacket value. + * Set number of bytes captured per packet, the remaining bytes are truncated. * * @param bytesToCapturePerPacket the bytesToCapturePerPacket value to set * @return the PacketCaptureParameters object itself. @@ -92,7 +92,7 @@ public PacketCaptureParameters withBytesToCapturePerPacket(Integer bytesToCaptur } /** - * Get the totalBytesPerSession value. + * Get maximum size of the capture output. * * @return the totalBytesPerSession value */ @@ -101,7 +101,7 @@ public Integer totalBytesPerSession() { } /** - * Set the totalBytesPerSession value. + * Set maximum size of the capture output. * * @param totalBytesPerSession the totalBytesPerSession value to set * @return the PacketCaptureParameters object itself. @@ -112,7 +112,7 @@ public PacketCaptureParameters withTotalBytesPerSession(Integer totalBytesPerSes } /** - * Get the timeLimitInSeconds value. + * Get maximum duration of the capture session in seconds. * * @return the timeLimitInSeconds value */ @@ -121,7 +121,7 @@ public Integer timeLimitInSeconds() { } /** - * Set the timeLimitInSeconds value. + * Set maximum duration of the capture session in seconds. * * @param timeLimitInSeconds the timeLimitInSeconds value to set * @return the PacketCaptureParameters object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PacketCaptureStorageLocation.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PacketCaptureStorageLocation.java index e9eee0b0bb0..4704e252fc1 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PacketCaptureStorageLocation.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PacketCaptureStorageLocation.java @@ -38,7 +38,7 @@ public class PacketCaptureStorageLocation { private String filePath; /** - * Get the storageId value. + * Get the ID of the storage account to save the packet capture session. Required if no local file path is provided. * * @return the storageId value */ @@ -47,7 +47,7 @@ public String storageId() { } /** - * Set the storageId value. + * Set the ID of the storage account to save the packet capture session. Required if no local file path is provided. * * @param storageId the storageId value to set * @return the PacketCaptureStorageLocation object itself. @@ -58,7 +58,7 @@ public PacketCaptureStorageLocation withStorageId(String storageId) { } /** - * Get the storagePath value. + * Get the URI of the storage path to save the packet capture. Must be a well-formed URI describing the location to save the packet capture. * * @return the storagePath value */ @@ -67,7 +67,7 @@ public String storagePath() { } /** - * Set the storagePath value. + * Set the URI of the storage path to save the packet capture. Must be a well-formed URI describing the location to save the packet capture. * * @param storagePath the storagePath value to set * @return the PacketCaptureStorageLocation object itself. @@ -78,7 +78,7 @@ public PacketCaptureStorageLocation withStoragePath(String storagePath) { } /** - * Get the filePath value. + * Get a valid local path on the targeting VM. Must include the name of the capture file (*.cap). For linux virtual machine it must start with /var/captures. Required if no storage ID is provided, otherwise optional. * * @return the filePath value */ @@ -87,7 +87,7 @@ public String filePath() { } /** - * Set the filePath value. + * Set a valid local path on the targeting VM. Must include the name of the capture file (*.cap). For linux virtual machine it must start with /var/captures. Required if no storage ID is provided, otherwise optional. * * @param filePath the filePath value to set * @return the PacketCaptureStorageLocation object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PcError.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PcError.java index 318994e05c1..b85b4a5ff7a 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PcError.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PcError.java @@ -8,61 +8,43 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for PcError. */ -public final class PcError { +public final class PcError extends ExpandableStringEnum { /** Static value InternalError for PcError. */ - public static final PcError INTERNAL_ERROR = new PcError("InternalError"); + public static final PcError INTERNAL_ERROR = fromString("InternalError"); /** Static value AgentStopped for PcError. */ - public static final PcError AGENT_STOPPED = new PcError("AgentStopped"); + public static final PcError AGENT_STOPPED = fromString("AgentStopped"); /** Static value CaptureFailed for PcError. */ - public static final PcError CAPTURE_FAILED = new PcError("CaptureFailed"); + public static final PcError CAPTURE_FAILED = fromString("CaptureFailed"); /** Static value LocalFileFailed for PcError. */ - public static final PcError LOCAL_FILE_FAILED = new PcError("LocalFileFailed"); + public static final PcError LOCAL_FILE_FAILED = fromString("LocalFileFailed"); /** Static value StorageFailed for PcError. */ - public static final PcError STORAGE_FAILED = new PcError("StorageFailed"); - - private String value; + public static final PcError STORAGE_FAILED = fromString("StorageFailed"); /** - * Creates a custom value for PcError. - * @param value the custom value + * Creates or finds a PcError from its string representation. + * @param name a name to look for + * @return the corresponding PcError */ - public PcError(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static PcError fromString(String name) { + return fromString(name, PcError.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof PcError)) { - return false; - } - if (obj == this) { - return true; - } - PcError rhs = (PcError) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known PcError values + */ + public static Collection values() { + return values(PcError.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PcProtocol.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PcProtocol.java index 38056e9708c..332c5408aeb 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PcProtocol.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PcProtocol.java @@ -8,55 +8,37 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for PcProtocol. */ -public final class PcProtocol { +public final class PcProtocol extends ExpandableStringEnum { /** Static value TCP for PcProtocol. */ - public static final PcProtocol TCP = new PcProtocol("TCP"); + public static final PcProtocol TCP = fromString("TCP"); /** Static value UDP for PcProtocol. */ - public static final PcProtocol UDP = new PcProtocol("UDP"); + public static final PcProtocol UDP = fromString("UDP"); /** Static value Any for PcProtocol. */ - public static final PcProtocol ANY = new PcProtocol("Any"); - - private String value; + public static final PcProtocol ANY = fromString("Any"); /** - * Creates a custom value for PcProtocol. - * @param value the custom value + * Creates or finds a PcProtocol from its string representation. + * @param name a name to look for + * @return the corresponding PcProtocol */ - public PcProtocol(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static PcProtocol fromString(String name) { + return fromString(name, PcProtocol.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof PcProtocol)) { - return false; - } - if (obj == this) { - return true; - } - PcProtocol rhs = (PcProtocol) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known PcProtocol values + */ + public static Collection values() { + return values(PcProtocol.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PcStatus.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PcStatus.java index c6e172a7470..a4a98398d43 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PcStatus.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PcStatus.java @@ -8,61 +8,43 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for PcStatus. */ -public final class PcStatus { +public final class PcStatus extends ExpandableStringEnum { /** Static value NotStarted for PcStatus. */ - public static final PcStatus NOT_STARTED = new PcStatus("NotStarted"); + public static final PcStatus NOT_STARTED = fromString("NotStarted"); /** Static value Running for PcStatus. */ - public static final PcStatus RUNNING = new PcStatus("Running"); + public static final PcStatus RUNNING = fromString("Running"); /** Static value Stopped for PcStatus. */ - public static final PcStatus STOPPED = new PcStatus("Stopped"); + public static final PcStatus STOPPED = fromString("Stopped"); /** Static value Error for PcStatus. */ - public static final PcStatus ERROR = new PcStatus("Error"); + public static final PcStatus ERROR = fromString("Error"); /** Static value Unknown for PcStatus. */ - public static final PcStatus UNKNOWN = new PcStatus("Unknown"); - - private String value; + public static final PcStatus UNKNOWN = fromString("Unknown"); /** - * Creates a custom value for PcStatus. - * @param value the custom value + * Creates or finds a PcStatus from its string representation. + * @param name a name to look for + * @return the corresponding PcStatus */ - public PcStatus(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static PcStatus fromString(String name) { + return fromString(name, PcStatus.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof PcStatus)) { - return false; - } - if (obj == this) { - return true; - } - PcStatus rhs = (PcStatus) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known PcStatus values + */ + public static Collection values() { + return values(PcStatus.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PfsGroup.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PfsGroup.java index 227876b2dd6..e2d1f2aeb76 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PfsGroup.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PfsGroup.java @@ -8,67 +8,55 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for PfsGroup. */ -public final class PfsGroup { +public final class PfsGroup extends ExpandableStringEnum { /** Static value None for PfsGroup. */ - public static final PfsGroup NONE = new PfsGroup("None"); + public static final PfsGroup NONE = fromString("None"); /** Static value PFS1 for PfsGroup. */ - public static final PfsGroup PFS1 = new PfsGroup("PFS1"); + public static final PfsGroup PFS1 = fromString("PFS1"); /** Static value PFS2 for PfsGroup. */ - public static final PfsGroup PFS2 = new PfsGroup("PFS2"); + public static final PfsGroup PFS2 = fromString("PFS2"); /** Static value PFS2048 for PfsGroup. */ - public static final PfsGroup PFS2048 = new PfsGroup("PFS2048"); + public static final PfsGroup PFS2048 = fromString("PFS2048"); /** Static value ECP256 for PfsGroup. */ - public static final PfsGroup ECP256 = new PfsGroup("ECP256"); + public static final PfsGroup ECP256 = fromString("ECP256"); /** Static value ECP384 for PfsGroup. */ - public static final PfsGroup ECP384 = new PfsGroup("ECP384"); + public static final PfsGroup ECP384 = fromString("ECP384"); /** Static value PFS24 for PfsGroup. */ - public static final PfsGroup PFS24 = new PfsGroup("PFS24"); + public static final PfsGroup PFS24 = fromString("PFS24"); - private String value; + /** Static value PFS14 for PfsGroup. */ + public static final PfsGroup PFS14 = fromString("PFS14"); + + /** Static value PFSMM for PfsGroup. */ + public static final PfsGroup PFSMM = fromString("PFSMM"); /** - * Creates a custom value for PfsGroup. - * @param value the custom value + * Creates or finds a PfsGroup from its string representation. + * @param name a name to look for + * @return the corresponding PfsGroup */ - public PfsGroup(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static PfsGroup fromString(String name) { + return fromString(name, PfsGroup.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof PfsGroup)) { - return false; - } - if (obj == this) { - return true; - } - PfsGroup rhs = (PfsGroup) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known PfsGroup values + */ + public static Collection values() { + return values(PfsGroup.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ProbeProtocol.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ProbeProtocol.java index 014f1724607..6c4352821fa 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ProbeProtocol.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ProbeProtocol.java @@ -8,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for ProbeProtocol. */ -public final class ProbeProtocol { +public final class ProbeProtocol extends ExpandableStringEnum { /** Static value Http for ProbeProtocol. */ - public static final ProbeProtocol HTTP = new ProbeProtocol("Http"); + public static final ProbeProtocol HTTP = fromString("Http"); /** Static value Tcp for ProbeProtocol. */ - public static final ProbeProtocol TCP = new ProbeProtocol("Tcp"); - - private String value; + public static final ProbeProtocol TCP = fromString("Tcp"); /** - * Creates a custom value for ProbeProtocol. - * @param value the custom value + * Creates or finds a ProbeProtocol from its string representation. + * @param name a name to look for + * @return the corresponding ProbeProtocol */ - public ProbeProtocol(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static ProbeProtocol fromString(String name) { + return fromString(name, ProbeProtocol.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof ProbeProtocol)) { - return false; - } - if (obj == this) { - return true; - } - ProbeProtocol rhs = (ProbeProtocol) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known ProbeProtocol values + */ + public static Collection values() { + return values(ProbeProtocol.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ProcessorArchitecture.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ProcessorArchitecture.java index b79db0cc738..f8f21ec67ca 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ProcessorArchitecture.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ProcessorArchitecture.java @@ -8,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for ProcessorArchitecture. */ -public final class ProcessorArchitecture { +public final class ProcessorArchitecture extends ExpandableStringEnum { /** Static value Amd64 for ProcessorArchitecture. */ - public static final ProcessorArchitecture AMD64 = new ProcessorArchitecture("Amd64"); + public static final ProcessorArchitecture AMD64 = fromString("Amd64"); /** Static value X86 for ProcessorArchitecture. */ - public static final ProcessorArchitecture X86 = new ProcessorArchitecture("X86"); - - private String value; + public static final ProcessorArchitecture X86 = fromString("X86"); /** - * Creates a custom value for ProcessorArchitecture. - * @param value the custom value + * Creates or finds a ProcessorArchitecture from its string representation. + * @param name a name to look for + * @return the corresponding ProcessorArchitecture */ - public ProcessorArchitecture(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static ProcessorArchitecture fromString(String name) { + return fromString(name, ProcessorArchitecture.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof ProcessorArchitecture)) { - return false; - } - if (obj == this) { - return true; - } - ProcessorArchitecture rhs = (ProcessorArchitecture) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known ProcessorArchitecture values + */ + public static Collection values() { + return values(ProcessorArchitecture.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Protocol.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Protocol.java index 5239385043e..8a30dace2f0 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Protocol.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Protocol.java @@ -8,52 +8,40 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for Protocol. */ -public final class Protocol { - /** Static value TCP for Protocol. */ - public static final Protocol TCP = new Protocol("TCP"); +public final class Protocol extends ExpandableStringEnum { + /** Static value Tcp for Protocol. */ + public static final Protocol TCP = fromString("Tcp"); - /** Static value UDP for Protocol. */ - public static final Protocol UDP = new Protocol("UDP"); + /** Static value Http for Protocol. */ + public static final Protocol HTTP = fromString("Http"); - private String value; + /** Static value Https for Protocol. */ + public static final Protocol HTTPS = fromString("Https"); + + /** Static value Icmp for Protocol. */ + public static final Protocol ICMP = fromString("Icmp"); /** - * Creates a custom value for Protocol. - * @param value the custom value + * Creates or finds a Protocol from its string representation. + * @param name a name to look for + * @return the corresponding Protocol */ - public Protocol(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static Protocol fromString(String name) { + return fromString(name, Protocol.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof Protocol)) { - return false; - } - if (obj == this) { - return true; - } - Protocol rhs = (Protocol) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known Protocol values + */ + public static Collection values() { + return values(Protocol.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ProtocolConfiguration.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ProtocolConfiguration.java new file mode 100644 index 00000000000..2efd779648a --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ProtocolConfiguration.java @@ -0,0 +1,43 @@ +/** + * 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.network; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Configuration of the protocol. + */ +public class ProtocolConfiguration { + /** + * The hTTPConfiguration property. + */ + @JsonProperty(value = "HTTPConfiguration") + private HTTPConfiguration hTTPConfiguration; + + /** + * Get the hTTPConfiguration value. + * + * @return the hTTPConfiguration value + */ + public HTTPConfiguration hTTPConfiguration() { + return this.hTTPConfiguration; + } + + /** + * Set the hTTPConfiguration value. + * + * @param hTTPConfiguration the hTTPConfiguration value to set + * @return the ProtocolConfiguration object itself. + */ + public ProtocolConfiguration withHTTPConfiguration(HTTPConfiguration hTTPConfiguration) { + this.hTTPConfiguration = hTTPConfiguration; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ProvisioningState.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ProvisioningState.java index f8c378d086a..087a96a1b8f 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ProvisioningState.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ProvisioningState.java @@ -8,58 +8,40 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for ProvisioningState. */ -public final class ProvisioningState { +public final class ProvisioningState extends ExpandableStringEnum { /** Static value Succeeded for ProvisioningState. */ - public static final ProvisioningState SUCCEEDED = new ProvisioningState("Succeeded"); + public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); /** Static value Updating for ProvisioningState. */ - public static final ProvisioningState UPDATING = new ProvisioningState("Updating"); + public static final ProvisioningState UPDATING = fromString("Updating"); /** Static value Deleting for ProvisioningState. */ - public static final ProvisioningState DELETING = new ProvisioningState("Deleting"); + public static final ProvisioningState DELETING = fromString("Deleting"); /** Static value Failed for ProvisioningState. */ - public static final ProvisioningState FAILED = new ProvisioningState("Failed"); - - private String value; + public static final ProvisioningState FAILED = fromString("Failed"); /** - * Creates a custom value for ProvisioningState. - * @param value the custom value + * Creates or finds a ProvisioningState from its string representation. + * @param name a name to look for + * @return the corresponding ProvisioningState */ - public ProvisioningState(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static ProvisioningState fromString(String name) { + return fromString(name, ProvisioningState.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof ProvisioningState)) { - return false; - } - if (obj == this) { - return true; - } - ProvisioningState rhs = (ProvisioningState) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known ProvisioningState values + */ + public static Collection values() { + return values(ProvisioningState.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PublicIPAddressDnsSettings.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PublicIPAddressDnsSettings.java index 7bf715833e0..4a0cb3e5877 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PublicIPAddressDnsSettings.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PublicIPAddressDnsSettings.java @@ -42,7 +42,7 @@ public class PublicIPAddressDnsSettings { private String reverseFqdn; /** - * Get the domainNameLabel value. + * Get gets or sets the Domain name label.The concatenation of the domain name label and the regionalized DNS zone make up the fully qualified domain name associated with the public IP address. If a domain name label is specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system. * * @return the domainNameLabel value */ @@ -51,7 +51,7 @@ public String domainNameLabel() { } /** - * Set the domainNameLabel value. + * Set gets or sets the Domain name label.The concatenation of the domain name label and the regionalized DNS zone make up the fully qualified domain name associated with the public IP address. If a domain name label is specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system. * * @param domainNameLabel the domainNameLabel value to set * @return the PublicIPAddressDnsSettings object itself. @@ -62,7 +62,7 @@ public PublicIPAddressDnsSettings withDomainNameLabel(String domainNameLabel) { } /** - * Get the fqdn value. + * Get gets the FQDN, Fully qualified domain name of the A DNS record associated with the public IP. This is the concatenation of the domainNameLabel and the regionalized DNS zone. * * @return the fqdn value */ @@ -71,7 +71,7 @@ public String fqdn() { } /** - * Set the fqdn value. + * Set gets the FQDN, Fully qualified domain name of the A DNS record associated with the public IP. This is the concatenation of the domainNameLabel and the regionalized DNS zone. * * @param fqdn the fqdn value to set * @return the PublicIPAddressDnsSettings object itself. @@ -82,7 +82,7 @@ public PublicIPAddressDnsSettings withFqdn(String fqdn) { } /** - * Get the reverseFqdn value. + * Get gets or Sets the Reverse FQDN. A user-visible, fully qualified domain name that resolves to this public IP address. If the reverseFqdn is specified, then a PTR DNS record is created pointing from the IP address in the in-addr.arpa domain to the reverse FQDN. * * @return the reverseFqdn value */ @@ -91,7 +91,7 @@ public String reverseFqdn() { } /** - * Set the reverseFqdn value. + * Set gets or Sets the Reverse FQDN. A user-visible, fully qualified domain name that resolves to this public IP address. If the reverseFqdn is specified, then a PTR DNS record is created pointing from the IP address in the in-addr.arpa domain to the reverse FQDN. * * @param reverseFqdn the reverseFqdn value to set * @return the PublicIPAddressDnsSettings object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PublicIPAddressSku.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PublicIPAddressSku.java index 7b845ec09dd..559ac2782f7 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PublicIPAddressSku.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PublicIPAddressSku.java @@ -22,7 +22,7 @@ public class PublicIPAddressSku { private PublicIPAddressSkuName name; /** - * Get the name value. + * Get name of a public IP address SKU. Possible values include: 'Basic', 'Standard'. * * @return the name value */ @@ -31,7 +31,7 @@ public PublicIPAddressSkuName name() { } /** - * Set the name value. + * Set name of a public IP address SKU. Possible values include: 'Basic', 'Standard'. * * @param name the name value to set * @return the PublicIPAddressSku object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PublicIPAddressSkuName.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PublicIPAddressSkuName.java index 4662e9c40db..0e794a4e3db 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PublicIPAddressSkuName.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PublicIPAddressSkuName.java @@ -8,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for PublicIPAddressSkuName. */ -public final class PublicIPAddressSkuName { +public final class PublicIPAddressSkuName extends ExpandableStringEnum { /** Static value Basic for PublicIPAddressSkuName. */ - public static final PublicIPAddressSkuName BASIC = new PublicIPAddressSkuName("Basic"); + public static final PublicIPAddressSkuName BASIC = fromString("Basic"); /** Static value Standard for PublicIPAddressSkuName. */ - public static final PublicIPAddressSkuName STANDARD = new PublicIPAddressSkuName("Standard"); - - private String value; + public static final PublicIPAddressSkuName STANDARD = fromString("Standard"); /** - * Creates a custom value for PublicIPAddressSkuName. - * @param value the custom value + * Creates or finds a PublicIPAddressSkuName from its string representation. + * @param name a name to look for + * @return the corresponding PublicIPAddressSkuName */ - public PublicIPAddressSkuName(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static PublicIPAddressSkuName fromString(String name) { + return fromString(name, PublicIPAddressSkuName.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof PublicIPAddressSkuName)) { - return false; - } - if (obj == this) { - return true; - } - PublicIPAddressSkuName rhs = (PublicIPAddressSkuName) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known PublicIPAddressSkuName values + */ + public static Collection values() { + return values(PublicIPAddressSkuName.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/QueryTroubleshootingParameters.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/QueryTroubleshootingParameters.java index de8ae7c1dff..d50291ebabb 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/QueryTroubleshootingParameters.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/QueryTroubleshootingParameters.java @@ -21,7 +21,7 @@ public class QueryTroubleshootingParameters { private String targetResourceId; /** - * Get the targetResourceId value. + * Get the target resource ID to query the troubleshooting result. * * @return the targetResourceId value */ @@ -30,7 +30,7 @@ public String targetResourceId() { } /** - * Set the targetResourceId value. + * Set the target resource ID to query the troubleshooting result. * * @param targetResourceId the targetResourceId value to set * @return the QueryTroubleshootingParameters object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/RetentionPolicyParameters.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/RetentionPolicyParameters.java index 793427b79aa..263fb89cab5 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/RetentionPolicyParameters.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/RetentionPolicyParameters.java @@ -27,7 +27,7 @@ public class RetentionPolicyParameters { private Boolean enabled; /** - * Get the days value. + * Get number of days to retain flow log records. * * @return the days value */ @@ -36,7 +36,7 @@ public Integer days() { } /** - * Set the days value. + * Set number of days to retain flow log records. * * @param days the days value to set * @return the RetentionPolicyParameters object itself. @@ -47,7 +47,7 @@ public RetentionPolicyParameters withDays(Integer days) { } /** - * Get the enabled value. + * Get flag to enable/disable retention. * * @return the enabled value */ @@ -56,7 +56,7 @@ public Boolean enabled() { } /** - * Set the enabled value. + * Set flag to enable/disable retention. * * @param enabled the enabled value to set * @return the RetentionPolicyParameters object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/RouteNextHopType.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/RouteNextHopType.java index 9516bcebc2f..614cf4aa12a 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/RouteNextHopType.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/RouteNextHopType.java @@ -8,61 +8,43 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for RouteNextHopType. */ -public final class RouteNextHopType { +public final class RouteNextHopType extends ExpandableStringEnum { /** Static value VirtualNetworkGateway for RouteNextHopType. */ - public static final RouteNextHopType VIRTUAL_NETWORK_GATEWAY = new RouteNextHopType("VirtualNetworkGateway"); + public static final RouteNextHopType VIRTUAL_NETWORK_GATEWAY = fromString("VirtualNetworkGateway"); /** Static value VnetLocal for RouteNextHopType. */ - public static final RouteNextHopType VNET_LOCAL = new RouteNextHopType("VnetLocal"); + public static final RouteNextHopType VNET_LOCAL = fromString("VnetLocal"); /** Static value Internet for RouteNextHopType. */ - public static final RouteNextHopType INTERNET = new RouteNextHopType("Internet"); + public static final RouteNextHopType INTERNET = fromString("Internet"); /** Static value VirtualAppliance for RouteNextHopType. */ - public static final RouteNextHopType VIRTUAL_APPLIANCE = new RouteNextHopType("VirtualAppliance"); + public static final RouteNextHopType VIRTUAL_APPLIANCE = fromString("VirtualAppliance"); /** Static value None for RouteNextHopType. */ - public static final RouteNextHopType NONE = new RouteNextHopType("None"); - - private String value; + public static final RouteNextHopType NONE = fromString("None"); /** - * Creates a custom value for RouteNextHopType. - * @param value the custom value + * Creates or finds a RouteNextHopType from its string representation. + * @param name a name to look for + * @return the corresponding RouteNextHopType */ - public RouteNextHopType(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static RouteNextHopType fromString(String name) { + return fromString(name, RouteNextHopType.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof RouteNextHopType)) { - return false; - } - if (obj == this) { - return true; - } - RouteNextHopType rhs = (RouteNextHopType) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known RouteNextHopType values + */ + public static Collection values() { + return values(RouteNextHopType.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/SecurityGroupNetworkInterface.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/SecurityGroupNetworkInterface.java index 66cd2447dcd..e38a5c25586 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/SecurityGroupNetworkInterface.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/SecurityGroupNetworkInterface.java @@ -27,7 +27,7 @@ public class SecurityGroupNetworkInterface { private SecurityRuleAssociations securityRuleAssociations; /** - * Get the id value. + * Get iD of the network interface. * * @return the id value */ @@ -36,7 +36,7 @@ public String id() { } /** - * Set the id value. + * Set iD of the network interface. * * @param id the id value to set * @return the SecurityGroupNetworkInterface object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/SecurityGroupViewParameters.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/SecurityGroupViewParameters.java index e018e706b02..db02ddb3bc2 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/SecurityGroupViewParameters.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/SecurityGroupViewParameters.java @@ -21,7 +21,7 @@ public class SecurityGroupViewParameters { private String targetResourceId; /** - * Get the targetResourceId value. + * Get iD of the target VM. * * @return the targetResourceId value */ @@ -30,7 +30,7 @@ public String targetResourceId() { } /** - * Set the targetResourceId value. + * Set iD of the target VM. * * @param targetResourceId the targetResourceId value to set * @return the SecurityGroupViewParameters object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/SecurityRuleAccess.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/SecurityRuleAccess.java index bcf540e056b..d5e67a37081 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/SecurityRuleAccess.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/SecurityRuleAccess.java @@ -8,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for SecurityRuleAccess. */ -public final class SecurityRuleAccess { +public final class SecurityRuleAccess extends ExpandableStringEnum { /** Static value Allow for SecurityRuleAccess. */ - public static final SecurityRuleAccess ALLOW = new SecurityRuleAccess("Allow"); + public static final SecurityRuleAccess ALLOW = fromString("Allow"); /** Static value Deny for SecurityRuleAccess. */ - public static final SecurityRuleAccess DENY = new SecurityRuleAccess("Deny"); - - private String value; + public static final SecurityRuleAccess DENY = fromString("Deny"); /** - * Creates a custom value for SecurityRuleAccess. - * @param value the custom value + * Creates or finds a SecurityRuleAccess from its string representation. + * @param name a name to look for + * @return the corresponding SecurityRuleAccess */ - public SecurityRuleAccess(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static SecurityRuleAccess fromString(String name) { + return fromString(name, SecurityRuleAccess.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof SecurityRuleAccess)) { - return false; - } - if (obj == this) { - return true; - } - SecurityRuleAccess rhs = (SecurityRuleAccess) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known SecurityRuleAccess values + */ + public static Collection values() { + return values(SecurityRuleAccess.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/SecurityRuleAssociations.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/SecurityRuleAssociations.java index 226424e71f4..03e145f932e 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/SecurityRuleAssociations.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/SecurityRuleAssociations.java @@ -81,7 +81,7 @@ public SecurityRuleAssociations withSubnetAssociation(SubnetAssociation subnetAs } /** - * Get the defaultSecurityRules value. + * Get collection of default security rules of the network security group. * * @return the defaultSecurityRules value */ @@ -90,7 +90,7 @@ public List defaultSecurityRules() { } /** - * Set the defaultSecurityRules value. + * Set collection of default security rules of the network security group. * * @param defaultSecurityRules the defaultSecurityRules value to set * @return the SecurityRuleAssociations object itself. @@ -101,7 +101,7 @@ public SecurityRuleAssociations withDefaultSecurityRules(List } /** - * Get the effectiveSecurityRules value. + * Get collection of effective security rules. * * @return the effectiveSecurityRules value */ @@ -110,7 +110,7 @@ public List effectiveSecurityRules() { } /** - * Set the effectiveSecurityRules value. + * Set collection of effective security rules. * * @param effectiveSecurityRules the effectiveSecurityRules value to set * @return the SecurityRuleAssociations object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/SecurityRuleDirection.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/SecurityRuleDirection.java index ef85548cde5..69100a07df9 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/SecurityRuleDirection.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/SecurityRuleDirection.java @@ -8,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for SecurityRuleDirection. */ -public final class SecurityRuleDirection { +public final class SecurityRuleDirection extends ExpandableStringEnum { /** Static value Inbound for SecurityRuleDirection. */ - public static final SecurityRuleDirection INBOUND = new SecurityRuleDirection("Inbound"); + public static final SecurityRuleDirection INBOUND = fromString("Inbound"); /** Static value Outbound for SecurityRuleDirection. */ - public static final SecurityRuleDirection OUTBOUND = new SecurityRuleDirection("Outbound"); - - private String value; + public static final SecurityRuleDirection OUTBOUND = fromString("Outbound"); /** - * Creates a custom value for SecurityRuleDirection. - * @param value the custom value + * Creates or finds a SecurityRuleDirection from its string representation. + * @param name a name to look for + * @return the corresponding SecurityRuleDirection */ - public SecurityRuleDirection(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static SecurityRuleDirection fromString(String name) { + return fromString(name, SecurityRuleDirection.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof SecurityRuleDirection)) { - return false; - } - if (obj == this) { - return true; - } - SecurityRuleDirection rhs = (SecurityRuleDirection) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known SecurityRuleDirection values + */ + public static Collection values() { + return values(SecurityRuleDirection.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/SecurityRuleProtocol.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/SecurityRuleProtocol.java index 421d8fc478b..6261d89f4bc 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/SecurityRuleProtocol.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/SecurityRuleProtocol.java @@ -8,55 +8,37 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for SecurityRuleProtocol. */ -public final class SecurityRuleProtocol { +public final class SecurityRuleProtocol extends ExpandableStringEnum { /** Static value Tcp for SecurityRuleProtocol. */ - public static final SecurityRuleProtocol TCP = new SecurityRuleProtocol("Tcp"); + public static final SecurityRuleProtocol TCP = fromString("Tcp"); /** Static value Udp for SecurityRuleProtocol. */ - public static final SecurityRuleProtocol UDP = new SecurityRuleProtocol("Udp"); + public static final SecurityRuleProtocol UDP = fromString("Udp"); /** Static value * for SecurityRuleProtocol. */ - public static final SecurityRuleProtocol ASTERISK = new SecurityRuleProtocol("*"); - - private String value; + public static final SecurityRuleProtocol ASTERISK = fromString("*"); /** - * Creates a custom value for SecurityRuleProtocol. - * @param value the custom value + * Creates or finds a SecurityRuleProtocol from its string representation. + * @param name a name to look for + * @return the corresponding SecurityRuleProtocol */ - public SecurityRuleProtocol(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static SecurityRuleProtocol fromString(String name) { + return fromString(name, SecurityRuleProtocol.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof SecurityRuleProtocol)) { - return false; - } - if (obj == this) { - return true; - } - SecurityRuleProtocol rhs = (SecurityRuleProtocol) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known SecurityRuleProtocol values + */ + public static Collection values() { + return values(SecurityRuleProtocol.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ServiceEndpointPropertiesFormat.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ServiceEndpointPropertiesFormat.java index 9dfc9b816a3..7e2d1a3d80c 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ServiceEndpointPropertiesFormat.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ServiceEndpointPropertiesFormat.java @@ -34,7 +34,7 @@ public class ServiceEndpointPropertiesFormat { private String provisioningState; /** - * Get the service value. + * Get the type of the endpoint service. * * @return the service value */ @@ -43,7 +43,7 @@ public String service() { } /** - * Set the service value. + * Set the type of the endpoint service. * * @param service the service value to set * @return the ServiceEndpointPropertiesFormat object itself. @@ -54,7 +54,7 @@ public ServiceEndpointPropertiesFormat withService(String service) { } /** - * Get the locations value. + * Get a list of locations. * * @return the locations value */ @@ -63,7 +63,7 @@ public List locations() { } /** - * Set the locations value. + * Set a list of locations. * * @param locations the locations value to set * @return the ServiceEndpointPropertiesFormat object itself. @@ -74,7 +74,7 @@ public ServiceEndpointPropertiesFormat withLocations(List locations) { } /** - * Get the provisioningState value. + * Get the provisioning state of the resource. * * @return the provisioningState value */ @@ -83,7 +83,7 @@ public String provisioningState() { } /** - * Set the provisioningState value. + * Set the provisioning state of the resource. * * @param provisioningState the provisioningState value to set * @return the ServiceEndpointPropertiesFormat object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ServiceProviderProvisioningState.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ServiceProviderProvisioningState.java index 642d411c2b4..ad61376c79f 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ServiceProviderProvisioningState.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ServiceProviderProvisioningState.java @@ -8,58 +8,40 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for ServiceProviderProvisioningState. */ -public final class ServiceProviderProvisioningState { +public final class ServiceProviderProvisioningState extends ExpandableStringEnum { /** Static value NotProvisioned for ServiceProviderProvisioningState. */ - public static final ServiceProviderProvisioningState NOT_PROVISIONED = new ServiceProviderProvisioningState("NotProvisioned"); + public static final ServiceProviderProvisioningState NOT_PROVISIONED = fromString("NotProvisioned"); /** Static value Provisioning for ServiceProviderProvisioningState. */ - public static final ServiceProviderProvisioningState PROVISIONING = new ServiceProviderProvisioningState("Provisioning"); + public static final ServiceProviderProvisioningState PROVISIONING = fromString("Provisioning"); /** Static value Provisioned for ServiceProviderProvisioningState. */ - public static final ServiceProviderProvisioningState PROVISIONED = new ServiceProviderProvisioningState("Provisioned"); + public static final ServiceProviderProvisioningState PROVISIONED = fromString("Provisioned"); /** Static value Deprovisioning for ServiceProviderProvisioningState. */ - public static final ServiceProviderProvisioningState DEPROVISIONING = new ServiceProviderProvisioningState("Deprovisioning"); - - private String value; + public static final ServiceProviderProvisioningState DEPROVISIONING = fromString("Deprovisioning"); /** - * Creates a custom value for ServiceProviderProvisioningState. - * @param value the custom value + * Creates or finds a ServiceProviderProvisioningState from its string representation. + * @param name a name to look for + * @return the corresponding ServiceProviderProvisioningState */ - public ServiceProviderProvisioningState(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static ServiceProviderProvisioningState fromString(String name) { + return fromString(name, ServiceProviderProvisioningState.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof ServiceProviderProvisioningState)) { - return false; - } - if (obj == this) { - return true; - } - ServiceProviderProvisioningState rhs = (ServiceProviderProvisioningState) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known ServiceProviderProvisioningState values + */ + public static Collection values() { + return values(ServiceProviderProvisioningState.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Severity.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Severity.java index 6469d9cbc28..aef63c34bd6 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Severity.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Severity.java @@ -8,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for Severity. */ -public final class Severity { +public final class Severity extends ExpandableStringEnum { /** Static value Error for Severity. */ - public static final Severity ERROR = new Severity("Error"); + public static final Severity ERROR = fromString("Error"); /** Static value Warning for Severity. */ - public static final Severity WARNING = new Severity("Warning"); - - private String value; + public static final Severity WARNING = fromString("Warning"); /** - * Creates a custom value for Severity. - * @param value the custom value + * Creates or finds a Severity from its string representation. + * @param name a name to look for + * @return the corresponding Severity */ - public Severity(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static Severity fromString(String name) { + return fromString(name, Severity.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof Severity)) { - return false; - } - if (obj == this) { - return true; - } - Severity rhs = (Severity) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known Severity values + */ + public static Collection values() { + return values(Severity.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/SubnetAssociation.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/SubnetAssociation.java index 23039b958e0..5d452fc93d0 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/SubnetAssociation.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/SubnetAssociation.java @@ -29,7 +29,7 @@ public class SubnetAssociation { private List securityRules; /** - * Get the id value. + * Get subnet ID. * * @return the id value */ @@ -38,7 +38,7 @@ public String id() { } /** - * Get the securityRules value. + * Get collection of custom security rules. * * @return the securityRules value */ @@ -47,7 +47,7 @@ public List securityRules() { } /** - * Set the securityRules value. + * Set collection of custom security rules. * * @param securityRules the securityRules value to set * @return the SubnetAssociation object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TagsObject.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TagsObject.java new file mode 100644 index 00000000000..9dc40d069b9 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TagsObject.java @@ -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.network; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Tags object for patch operations. + */ +public class TagsObject { + /** + * Resource tags. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * Get resource tags. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set resource tags. + * + * @param tags the tags value to set + * @return the TagsObject object itself. + */ + public TagsObject withTags(Map tags) { + this.tags = tags; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TopologyAssociation.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TopologyAssociation.java index 345b8bc5abf..86014a8353f 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TopologyAssociation.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TopologyAssociation.java @@ -34,7 +34,7 @@ public class TopologyAssociation { private AssociationType associationType; /** - * Get the name value. + * Get the name of the resource that is associated with the parent resource. * * @return the name value */ @@ -43,7 +43,7 @@ public String name() { } /** - * Set the name value. + * Set the name of the resource that is associated with the parent resource. * * @param name the name value to set * @return the TopologyAssociation object itself. @@ -54,7 +54,7 @@ public TopologyAssociation withName(String name) { } /** - * Get the resourceId value. + * Get the ID of the resource that is associated with the parent resource. * * @return the resourceId value */ @@ -63,7 +63,7 @@ public String resourceId() { } /** - * Set the resourceId value. + * Set the ID of the resource that is associated with the parent resource. * * @param resourceId the resourceId value to set * @return the TopologyAssociation object itself. @@ -74,7 +74,7 @@ public TopologyAssociation withResourceId(String resourceId) { } /** - * Get the associationType value. + * Get the association type of the child resource to the parent resource. Possible values include: 'Associated', 'Contains'. * * @return the associationType value */ @@ -83,7 +83,7 @@ public AssociationType associationType() { } /** - * Set the associationType value. + * Set the association type of the child resource to the parent resource. Possible values include: 'Associated', 'Contains'. * * @param associationType the associationType value to set * @return the TopologyAssociation object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TopologyParameters.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TopologyParameters.java index a1b16b4938c..a477dd1ed00 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TopologyParameters.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TopologyParameters.java @@ -8,6 +8,7 @@ package com.microsoft.azure.management.network; +import com.microsoft.azure.SubResource; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -17,11 +18,23 @@ public class TopologyParameters { /** * The name of the target resource group to perform topology on. */ - @JsonProperty(value = "targetResourceGroupName", required = true) + @JsonProperty(value = "targetResourceGroupName") private String targetResourceGroupName; /** - * Get the targetResourceGroupName value. + * The reference of the Virtual Network resource. + */ + @JsonProperty(value = "targetVirtualNetwork") + private SubResource targetVirtualNetwork; + + /** + * The reference of the Subnet resource. + */ + @JsonProperty(value = "targetSubnet") + private SubResource targetSubnet; + + /** + * Get the name of the target resource group to perform topology on. * * @return the targetResourceGroupName value */ @@ -30,7 +43,7 @@ public String targetResourceGroupName() { } /** - * Set the targetResourceGroupName value. + * Set the name of the target resource group to perform topology on. * * @param targetResourceGroupName the targetResourceGroupName value to set * @return the TopologyParameters object itself. @@ -40,4 +53,44 @@ public TopologyParameters withTargetResourceGroupName(String targetResourceGroup return this; } + /** + * Get the reference of the Virtual Network resource. + * + * @return the targetVirtualNetwork value + */ + public SubResource targetVirtualNetwork() { + return this.targetVirtualNetwork; + } + + /** + * Set the reference of the Virtual Network resource. + * + * @param targetVirtualNetwork the targetVirtualNetwork value to set + * @return the TopologyParameters object itself. + */ + public TopologyParameters withTargetVirtualNetwork(SubResource targetVirtualNetwork) { + this.targetVirtualNetwork = targetVirtualNetwork; + return this; + } + + /** + * Get the reference of the Subnet resource. + * + * @return the targetSubnet value + */ + public SubResource targetSubnet() { + return this.targetSubnet; + } + + /** + * Set the reference of the Subnet resource. + * + * @param targetSubnet the targetSubnet value to set + * @return the TopologyParameters object itself. + */ + public TopologyParameters withTargetSubnet(SubResource targetSubnet) { + this.targetSubnet = targetSubnet; + return this; + } + } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TopologyResource.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TopologyResource.java index d14f06868e0..4bd8d44c2a0 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TopologyResource.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TopologyResource.java @@ -41,7 +41,7 @@ public class TopologyResource { private List associations; /** - * Get the name value. + * Get name of the resource. * * @return the name value */ @@ -50,7 +50,7 @@ public String name() { } /** - * Set the name value. + * Set name of the resource. * * @param name the name value to set * @return the TopologyResource object itself. @@ -61,7 +61,7 @@ public TopologyResource withName(String name) { } /** - * Get the id value. + * Get iD of the resource. * * @return the id value */ @@ -70,7 +70,7 @@ public String id() { } /** - * Set the id value. + * Set iD of the resource. * * @param id the id value to set * @return the TopologyResource object itself. @@ -81,7 +81,7 @@ public TopologyResource withId(String id) { } /** - * Get the location value. + * Get resource location. * * @return the location value */ @@ -90,7 +90,7 @@ public String location() { } /** - * Set the location value. + * Set resource location. * * @param location the location value to set * @return the TopologyResource object itself. @@ -101,7 +101,7 @@ public TopologyResource withLocation(String location) { } /** - * Get the associations value. + * Get holds the associations the resource has with other resources in the resource group. * * @return the associations value */ @@ -110,7 +110,7 @@ public List associations() { } /** - * Set the associations value. + * Set holds the associations the resource has with other resources in the resource group. * * @param associations the associations value to set * @return the TopologyResource object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TrafficAnalyticsConfigurationProperties.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TrafficAnalyticsConfigurationProperties.java new file mode 100644 index 00000000000..65b4396f213 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TrafficAnalyticsConfigurationProperties.java @@ -0,0 +1,121 @@ +/** + * 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.network; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameters that define the configuration of traffic analytics. + */ +public class TrafficAnalyticsConfigurationProperties { + /** + * Flag to enable/disable traffic analytics. + */ + @JsonProperty(value = "enabled", required = true) + private boolean enabled; + + /** + * The resource guid of the attached workspace. + */ + @JsonProperty(value = "workspaceId", required = true) + private String workspaceId; + + /** + * The location of the attached workspace. + */ + @JsonProperty(value = "workspaceRegion", required = true) + private String workspaceRegion; + + /** + * Resource Id of the attached workspace. + */ + @JsonProperty(value = "workspaceResourceId", required = true) + private String workspaceResourceId; + + /** + * Get flag to enable/disable traffic analytics. + * + * @return the enabled value + */ + public boolean enabled() { + return this.enabled; + } + + /** + * Set flag to enable/disable traffic analytics. + * + * @param enabled the enabled value to set + * @return the TrafficAnalyticsConfigurationProperties object itself. + */ + public TrafficAnalyticsConfigurationProperties withEnabled(boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the resource guid of the attached workspace. + * + * @return the workspaceId value + */ + public String workspaceId() { + return this.workspaceId; + } + + /** + * Set the resource guid of the attached workspace. + * + * @param workspaceId the workspaceId value to set + * @return the TrafficAnalyticsConfigurationProperties object itself. + */ + public TrafficAnalyticsConfigurationProperties withWorkspaceId(String workspaceId) { + this.workspaceId = workspaceId; + return this; + } + + /** + * Get the location of the attached workspace. + * + * @return the workspaceRegion value + */ + public String workspaceRegion() { + return this.workspaceRegion; + } + + /** + * Set the location of the attached workspace. + * + * @param workspaceRegion the workspaceRegion value to set + * @return the TrafficAnalyticsConfigurationProperties object itself. + */ + public TrafficAnalyticsConfigurationProperties withWorkspaceRegion(String workspaceRegion) { + this.workspaceRegion = workspaceRegion; + return this; + } + + /** + * Get resource Id of the attached workspace. + * + * @return the workspaceResourceId value + */ + public String workspaceResourceId() { + return this.workspaceResourceId; + } + + /** + * Set resource Id of the attached workspace. + * + * @param workspaceResourceId the workspaceResourceId value to set + * @return the TrafficAnalyticsConfigurationProperties object itself. + */ + public TrafficAnalyticsConfigurationProperties withWorkspaceResourceId(String workspaceResourceId) { + this.workspaceResourceId = workspaceResourceId; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TrafficAnalyticsProperties.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TrafficAnalyticsProperties.java new file mode 100644 index 00000000000..27e2ecd71b7 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TrafficAnalyticsProperties.java @@ -0,0 +1,43 @@ +/** + * 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.network; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameters that define the configuration of traffic analytics. + */ +public class TrafficAnalyticsProperties { + /** + * The networkWatcherFlowAnalyticsConfiguration property. + */ + @JsonProperty(value = "networkWatcherFlowAnalyticsConfiguration", required = true) + private TrafficAnalyticsConfigurationProperties networkWatcherFlowAnalyticsConfiguration; + + /** + * Get the networkWatcherFlowAnalyticsConfiguration value. + * + * @return the networkWatcherFlowAnalyticsConfiguration value + */ + public TrafficAnalyticsConfigurationProperties networkWatcherFlowAnalyticsConfiguration() { + return this.networkWatcherFlowAnalyticsConfiguration; + } + + /** + * Set the networkWatcherFlowAnalyticsConfiguration value. + * + * @param networkWatcherFlowAnalyticsConfiguration the networkWatcherFlowAnalyticsConfiguration value to set + * @return the TrafficAnalyticsProperties object itself. + */ + public TrafficAnalyticsProperties withNetworkWatcherFlowAnalyticsConfiguration(TrafficAnalyticsConfigurationProperties networkWatcherFlowAnalyticsConfiguration) { + this.networkWatcherFlowAnalyticsConfiguration = networkWatcherFlowAnalyticsConfiguration; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TransportProtocol.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TransportProtocol.java index 9b4141859a7..aac8d9ab797 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TransportProtocol.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TransportProtocol.java @@ -8,52 +8,37 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for TransportProtocol. */ -public final class TransportProtocol { +public final class TransportProtocol extends ExpandableStringEnum { /** Static value Udp for TransportProtocol. */ - public static final TransportProtocol UDP = new TransportProtocol("Udp"); + public static final TransportProtocol UDP = fromString("Udp"); /** Static value Tcp for TransportProtocol. */ - public static final TransportProtocol TCP = new TransportProtocol("Tcp"); + public static final TransportProtocol TCP = fromString("Tcp"); - private String value; + /** Static value All for TransportProtocol. */ + public static final TransportProtocol ALL = fromString("All"); /** - * Creates a custom value for TransportProtocol. - * @param value the custom value + * Creates or finds a TransportProtocol from its string representation. + * @param name a name to look for + * @return the corresponding TransportProtocol */ - public TransportProtocol(String value) { - this.value = value; + @JsonCreator + public static TransportProtocol fromString(String name) { + return fromString(name, TransportProtocol.class); } - @JsonValue - @Override - public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof TransportProtocol)) { - return false; - } - if (obj == this) { - return true; - } - TransportProtocol rhs = (TransportProtocol) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known TransportProtocol values + */ + public static Collection values() { + return values(TransportProtocol.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TroubleshootingDetails.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TroubleshootingDetails.java index 0b4b2544fbe..ed34663d524 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TroubleshootingDetails.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TroubleshootingDetails.java @@ -46,7 +46,7 @@ public class TroubleshootingDetails { private List recommendedActions; /** - * Get the id value. + * Get the id of the get troubleshoot operation. * * @return the id value */ @@ -55,7 +55,7 @@ public String id() { } /** - * Set the id value. + * Set the id of the get troubleshoot operation. * * @param id the id value to set * @return the TroubleshootingDetails object itself. @@ -66,7 +66,7 @@ public TroubleshootingDetails withId(String id) { } /** - * Get the reasonType value. + * Get reason type of failure. * * @return the reasonType value */ @@ -75,7 +75,7 @@ public String reasonType() { } /** - * Set the reasonType value. + * Set reason type of failure. * * @param reasonType the reasonType value to set * @return the TroubleshootingDetails object itself. @@ -86,7 +86,7 @@ public TroubleshootingDetails withReasonType(String reasonType) { } /** - * Get the summary value. + * Get a summary of troubleshooting. * * @return the summary value */ @@ -95,7 +95,7 @@ public String summary() { } /** - * Set the summary value. + * Set a summary of troubleshooting. * * @param summary the summary value to set * @return the TroubleshootingDetails object itself. @@ -106,7 +106,7 @@ public TroubleshootingDetails withSummary(String summary) { } /** - * Get the detail value. + * Get details on troubleshooting results. * * @return the detail value */ @@ -115,7 +115,7 @@ public String detail() { } /** - * Set the detail value. + * Set details on troubleshooting results. * * @param detail the detail value to set * @return the TroubleshootingDetails object itself. @@ -126,7 +126,7 @@ public TroubleshootingDetails withDetail(String detail) { } /** - * Get the recommendedActions value. + * Get list of recommended actions. * * @return the recommendedActions value */ @@ -135,7 +135,7 @@ public List recommendedActions() { } /** - * Set the recommendedActions value. + * Set list of recommended actions. * * @param recommendedActions the recommendedActions value to set * @return the TroubleshootingDetails object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TroubleshootingParameters.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TroubleshootingParameters.java new file mode 100644 index 00000000000..7d25f52a520 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TroubleshootingParameters.java @@ -0,0 +1,97 @@ +/** + * 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.network; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Parameters that define the resource to troubleshoot. + */ +@JsonFlatten +public class TroubleshootingParameters { + /** + * The target resource to troubleshoot. + */ + @JsonProperty(value = "targetResourceId", required = true) + private String targetResourceId; + + /** + * The ID for the storage account to save the troubleshoot result. + */ + @JsonProperty(value = "properties.storageId", required = true) + private String storageId; + + /** + * The path to the blob to save the troubleshoot result in. + */ + @JsonProperty(value = "properties.storagePath", required = true) + private String storagePath; + + /** + * Get the target resource to troubleshoot. + * + * @return the targetResourceId value + */ + public String targetResourceId() { + return this.targetResourceId; + } + + /** + * Set the target resource to troubleshoot. + * + * @param targetResourceId the targetResourceId value to set + * @return the TroubleshootingParameters object itself. + */ + public TroubleshootingParameters withTargetResourceId(String targetResourceId) { + this.targetResourceId = targetResourceId; + return this; + } + + /** + * Get the ID for the storage account to save the troubleshoot result. + * + * @return the storageId value + */ + public String storageId() { + return this.storageId; + } + + /** + * Set the ID for the storage account to save the troubleshoot result. + * + * @param storageId the storageId value to set + * @return the TroubleshootingParameters object itself. + */ + public TroubleshootingParameters withStorageId(String storageId) { + this.storageId = storageId; + return this; + } + + /** + * Get the path to the blob to save the troubleshoot result in. + * + * @return the storagePath value + */ + public String storagePath() { + return this.storagePath; + } + + /** + * Set the path to the blob to save the troubleshoot result in. + * + * @param storagePath the storagePath value to set + * @return the TroubleshootingParameters object itself. + */ + public TroubleshootingParameters withStoragePath(String storagePath) { + this.storagePath = storagePath; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TroubleshootingRecommendedActions.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TroubleshootingRecommendedActions.java index 1c84f7ee24c..e3d47357e05 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TroubleshootingRecommendedActions.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TroubleshootingRecommendedActions.java @@ -41,7 +41,7 @@ public class TroubleshootingRecommendedActions { private String actionUriText; /** - * Get the actionId value. + * Get iD of the recommended action. * * @return the actionId value */ @@ -50,7 +50,7 @@ public String actionId() { } /** - * Set the actionId value. + * Set iD of the recommended action. * * @param actionId the actionId value to set * @return the TroubleshootingRecommendedActions object itself. @@ -61,7 +61,7 @@ public TroubleshootingRecommendedActions withActionId(String actionId) { } /** - * Get the actionText value. + * Get description of recommended actions. * * @return the actionText value */ @@ -70,7 +70,7 @@ public String actionText() { } /** - * Set the actionText value. + * Set description of recommended actions. * * @param actionText the actionText value to set * @return the TroubleshootingRecommendedActions object itself. @@ -81,7 +81,7 @@ public TroubleshootingRecommendedActions withActionText(String actionText) { } /** - * Get the actionUri value. + * Get the uri linking to a documentation for the recommended troubleshooting actions. * * @return the actionUri value */ @@ -90,7 +90,7 @@ public String actionUri() { } /** - * Set the actionUri value. + * Set the uri linking to a documentation for the recommended troubleshooting actions. * * @param actionUri the actionUri value to set * @return the TroubleshootingRecommendedActions object itself. @@ -101,7 +101,7 @@ public TroubleshootingRecommendedActions withActionUri(String actionUri) { } /** - * Get the actionUriText value. + * Get the information from the URI for the recommended troubleshooting actions. * * @return the actionUriText value */ @@ -110,7 +110,7 @@ public String actionUriText() { } /** - * Set the actionUriText value. + * Set the information from the URI for the recommended troubleshooting actions. * * @param actionUriText the actionUriText value to set * @return the TroubleshootingRecommendedActions object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TunnelConnectionHealth.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TunnelConnectionHealth.java index 9a9925b3f40..aa27f1b28eb 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TunnelConnectionHealth.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TunnelConnectionHealth.java @@ -46,7 +46,7 @@ public class TunnelConnectionHealth { private String lastConnectionEstablishedUtcTime; /** - * Get the tunnel value. + * Get tunnel name. * * @return the tunnel value */ @@ -55,7 +55,7 @@ public String tunnel() { } /** - * Get the connectionStatus value. + * Get virtual network Gateway connection status. Possible values include: 'Unknown', 'Connecting', 'Connected', 'NotConnected'. * * @return the connectionStatus value */ @@ -64,7 +64,7 @@ public VirtualNetworkGatewayConnectionStatus connectionStatus() { } /** - * Get the ingressBytesTransferred value. + * Get the Ingress Bytes Transferred in this connection. * * @return the ingressBytesTransferred value */ @@ -73,7 +73,7 @@ public Long ingressBytesTransferred() { } /** - * Get the egressBytesTransferred value. + * Get the Egress Bytes Transferred in this connection. * * @return the egressBytesTransferred value */ @@ -82,7 +82,7 @@ public Long egressBytesTransferred() { } /** - * Get the lastConnectionEstablishedUtcTime value. + * Get the time at which connection was established in Utc format. * * @return the lastConnectionEstablishedUtcTime value */ diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/UsageName.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/UsageName.java index 6c7b98d04f1..3ef74868b9e 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/UsageName.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/UsageName.java @@ -27,7 +27,7 @@ public class UsageName { private String localizedValue; /** - * Get the value value. + * Get a string describing the resource name. * * @return the value value */ @@ -36,7 +36,7 @@ public String value() { } /** - * Set the value value. + * Set a string describing the resource name. * * @param value the value value to set * @return the UsageName object itself. @@ -47,7 +47,7 @@ public UsageName withValue(String value) { } /** - * Get the localizedValue value. + * Get a localized string describing the resource name. * * @return the localizedValue value */ @@ -56,7 +56,7 @@ public String localizedValue() { } /** - * Set the localizedValue value. + * Set a localized string describing the resource name. * * @param localizedValue the localizedValue value to set * @return the UsageName object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VerificationIPFlowParameters.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VerificationIPFlowParameters.java new file mode 100644 index 00000000000..95023bc310c --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VerificationIPFlowParameters.java @@ -0,0 +1,231 @@ +/** + * 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.network; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameters that define the IP flow to be verified. + */ +public class VerificationIPFlowParameters { + /** + * The ID of the target resource to perform next-hop on. + */ + @JsonProperty(value = "targetResourceId", required = true) + private String targetResourceId; + + /** + * The direction of the packet represented as a 5-tuple. Possible values + * include: 'Inbound', 'Outbound'. + */ + @JsonProperty(value = "direction", required = true) + private Direction direction; + + /** + * Protocol to be verified on. Possible values include: 'TCP', 'UDP'. + */ + @JsonProperty(value = "protocol", required = true) + private IpFlowProtocol protocol; + + /** + * The local port. Acceptable values are a single integer in the range + * (0-65535). Support for * for the source port, which depends on the + * direction. + */ + @JsonProperty(value = "localPort", required = true) + private String localPort; + + /** + * The remote port. Acceptable values are a single integer in the range + * (0-65535). Support for * for the source port, which depends on the + * direction. + */ + @JsonProperty(value = "remotePort", required = true) + private String remotePort; + + /** + * The local IP address. Acceptable values are valid IPv4 addresses. + */ + @JsonProperty(value = "localIPAddress", required = true) + private String localIPAddress; + + /** + * The remote IP address. Acceptable values are valid IPv4 addresses. + */ + @JsonProperty(value = "remoteIPAddress", required = true) + private String remoteIPAddress; + + /** + * The NIC ID. (If VM has multiple NICs and IP forwarding is enabled on any + * of them, then this parameter must be specified. Otherwise optional). + */ + @JsonProperty(value = "targetNicResourceId") + private String targetNicResourceId; + + /** + * Get the ID of the target resource to perform next-hop on. + * + * @return the targetResourceId value + */ + public String targetResourceId() { + return this.targetResourceId; + } + + /** + * Set the ID of the target resource to perform next-hop on. + * + * @param targetResourceId the targetResourceId value to set + * @return the VerificationIPFlowParameters object itself. + */ + public VerificationIPFlowParameters withTargetResourceId(String targetResourceId) { + this.targetResourceId = targetResourceId; + return this; + } + + /** + * Get the direction of the packet represented as a 5-tuple. Possible values include: 'Inbound', 'Outbound'. + * + * @return the direction value + */ + public Direction direction() { + return this.direction; + } + + /** + * Set the direction of the packet represented as a 5-tuple. Possible values include: 'Inbound', 'Outbound'. + * + * @param direction the direction value to set + * @return the VerificationIPFlowParameters object itself. + */ + public VerificationIPFlowParameters withDirection(Direction direction) { + this.direction = direction; + return this; + } + + /** + * Get protocol to be verified on. Possible values include: 'TCP', 'UDP'. + * + * @return the protocol value + */ + public IpFlowProtocol protocol() { + return this.protocol; + } + + /** + * Set protocol to be verified on. Possible values include: 'TCP', 'UDP'. + * + * @param protocol the protocol value to set + * @return the VerificationIPFlowParameters object itself. + */ + public VerificationIPFlowParameters withProtocol(IpFlowProtocol protocol) { + this.protocol = protocol; + return this; + } + + /** + * Get the local port. Acceptable values are a single integer in the range (0-65535). Support for * for the source port, which depends on the direction. + * + * @return the localPort value + */ + public String localPort() { + return this.localPort; + } + + /** + * Set the local port. Acceptable values are a single integer in the range (0-65535). Support for * for the source port, which depends on the direction. + * + * @param localPort the localPort value to set + * @return the VerificationIPFlowParameters object itself. + */ + public VerificationIPFlowParameters withLocalPort(String localPort) { + this.localPort = localPort; + return this; + } + + /** + * Get the remote port. Acceptable values are a single integer in the range (0-65535). Support for * for the source port, which depends on the direction. + * + * @return the remotePort value + */ + public String remotePort() { + return this.remotePort; + } + + /** + * Set the remote port. Acceptable values are a single integer in the range (0-65535). Support for * for the source port, which depends on the direction. + * + * @param remotePort the remotePort value to set + * @return the VerificationIPFlowParameters object itself. + */ + public VerificationIPFlowParameters withRemotePort(String remotePort) { + this.remotePort = remotePort; + return this; + } + + /** + * Get the local IP address. Acceptable values are valid IPv4 addresses. + * + * @return the localIPAddress value + */ + public String localIPAddress() { + return this.localIPAddress; + } + + /** + * Set the local IP address. Acceptable values are valid IPv4 addresses. + * + * @param localIPAddress the localIPAddress value to set + * @return the VerificationIPFlowParameters object itself. + */ + public VerificationIPFlowParameters withLocalIPAddress(String localIPAddress) { + this.localIPAddress = localIPAddress; + return this; + } + + /** + * Get the remote IP address. Acceptable values are valid IPv4 addresses. + * + * @return the remoteIPAddress value + */ + public String remoteIPAddress() { + return this.remoteIPAddress; + } + + /** + * Set the remote IP address. Acceptable values are valid IPv4 addresses. + * + * @param remoteIPAddress the remoteIPAddress value to set + * @return the VerificationIPFlowParameters object itself. + */ + public VerificationIPFlowParameters withRemoteIPAddress(String remoteIPAddress) { + this.remoteIPAddress = remoteIPAddress; + return this; + } + + /** + * Get the NIC ID. (If VM has multiple NICs and IP forwarding is enabled on any of them, then this parameter must be specified. Otherwise optional). + * + * @return the targetNicResourceId value + */ + public String targetNicResourceId() { + return this.targetNicResourceId; + } + + /** + * Set the NIC ID. (If VM has multiple NICs and IP forwarding is enabled on any of them, then this parameter must be specified. Otherwise optional). + * + * @param targetNicResourceId the targetNicResourceId value to set + * @return the VerificationIPFlowParameters object itself. + */ + public VerificationIPFlowParameters withTargetNicResourceId(String targetNicResourceId) { + this.targetNicResourceId = targetNicResourceId; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkConnectionGatewayReference.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkConnectionGatewayReference.java index 4b4e0addd99..c5e72e91483 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkConnectionGatewayReference.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkConnectionGatewayReference.java @@ -21,7 +21,7 @@ public class VirtualNetworkConnectionGatewayReference { private String id; /** - * Get the id value. + * Get the ID of VirtualNetworkGateway or LocalNetworkGateway resource. * * @return the id value */ @@ -30,7 +30,7 @@ public String id() { } /** - * Set the id value. + * Set the ID of VirtualNetworkGateway or LocalNetworkGateway resource. * * @param id the id value to set * @return the VirtualNetworkConnectionGatewayReference object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewayConnectionStatus.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewayConnectionStatus.java index 349bf23dda2..ebbcb65f05f 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewayConnectionStatus.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewayConnectionStatus.java @@ -8,58 +8,40 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for VirtualNetworkGatewayConnectionStatus. */ -public final class VirtualNetworkGatewayConnectionStatus { +public final class VirtualNetworkGatewayConnectionStatus extends ExpandableStringEnum { /** Static value Unknown for VirtualNetworkGatewayConnectionStatus. */ - public static final VirtualNetworkGatewayConnectionStatus UNKNOWN = new VirtualNetworkGatewayConnectionStatus("Unknown"); + public static final VirtualNetworkGatewayConnectionStatus UNKNOWN = fromString("Unknown"); /** Static value Connecting for VirtualNetworkGatewayConnectionStatus. */ - public static final VirtualNetworkGatewayConnectionStatus CONNECTING = new VirtualNetworkGatewayConnectionStatus("Connecting"); + public static final VirtualNetworkGatewayConnectionStatus CONNECTING = fromString("Connecting"); /** Static value Connected for VirtualNetworkGatewayConnectionStatus. */ - public static final VirtualNetworkGatewayConnectionStatus CONNECTED = new VirtualNetworkGatewayConnectionStatus("Connected"); + public static final VirtualNetworkGatewayConnectionStatus CONNECTED = fromString("Connected"); /** Static value NotConnected for VirtualNetworkGatewayConnectionStatus. */ - public static final VirtualNetworkGatewayConnectionStatus NOT_CONNECTED = new VirtualNetworkGatewayConnectionStatus("NotConnected"); - - private String value; + public static final VirtualNetworkGatewayConnectionStatus NOT_CONNECTED = fromString("NotConnected"); /** - * Creates a custom value for VirtualNetworkGatewayConnectionStatus. - * @param value the custom value + * Creates or finds a VirtualNetworkGatewayConnectionStatus from its string representation. + * @param name a name to look for + * @return the corresponding VirtualNetworkGatewayConnectionStatus */ - public VirtualNetworkGatewayConnectionStatus(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static VirtualNetworkGatewayConnectionStatus fromString(String name) { + return fromString(name, VirtualNetworkGatewayConnectionStatus.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof VirtualNetworkGatewayConnectionStatus)) { - return false; - } - if (obj == this) { - return true; - } - VirtualNetworkGatewayConnectionStatus rhs = (VirtualNetworkGatewayConnectionStatus) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known VirtualNetworkGatewayConnectionStatus values + */ + public static Collection values() { + return values(VirtualNetworkGatewayConnectionStatus.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewayConnectionType.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewayConnectionType.java index 8f87ef1613d..476cddd4096 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewayConnectionType.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewayConnectionType.java @@ -8,58 +8,40 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for VirtualNetworkGatewayConnectionType. */ -public final class VirtualNetworkGatewayConnectionType { +public final class VirtualNetworkGatewayConnectionType extends ExpandableStringEnum { /** Static value IPsec for VirtualNetworkGatewayConnectionType. */ - public static final VirtualNetworkGatewayConnectionType IPSEC = new VirtualNetworkGatewayConnectionType("IPsec"); + public static final VirtualNetworkGatewayConnectionType IPSEC = fromString("IPsec"); /** Static value Vnet2Vnet for VirtualNetworkGatewayConnectionType. */ - public static final VirtualNetworkGatewayConnectionType VNET2VNET = new VirtualNetworkGatewayConnectionType("Vnet2Vnet"); + public static final VirtualNetworkGatewayConnectionType VNET2VNET = fromString("Vnet2Vnet"); /** Static value ExpressRoute for VirtualNetworkGatewayConnectionType. */ - public static final VirtualNetworkGatewayConnectionType EXPRESS_ROUTE = new VirtualNetworkGatewayConnectionType("ExpressRoute"); + public static final VirtualNetworkGatewayConnectionType EXPRESS_ROUTE = fromString("ExpressRoute"); /** Static value VPNClient for VirtualNetworkGatewayConnectionType. */ - public static final VirtualNetworkGatewayConnectionType VPNCLIENT = new VirtualNetworkGatewayConnectionType("VPNClient"); - - private String value; + public static final VirtualNetworkGatewayConnectionType VPNCLIENT = fromString("VPNClient"); /** - * Creates a custom value for VirtualNetworkGatewayConnectionType. - * @param value the custom value + * Creates or finds a VirtualNetworkGatewayConnectionType from its string representation. + * @param name a name to look for + * @return the corresponding VirtualNetworkGatewayConnectionType */ - public VirtualNetworkGatewayConnectionType(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static VirtualNetworkGatewayConnectionType fromString(String name) { + return fromString(name, VirtualNetworkGatewayConnectionType.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof VirtualNetworkGatewayConnectionType)) { - return false; - } - if (obj == this) { - return true; - } - VirtualNetworkGatewayConnectionType rhs = (VirtualNetworkGatewayConnectionType) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known VirtualNetworkGatewayConnectionType values + */ + public static Collection values() { + return values(VirtualNetworkGatewayConnectionType.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewaySku.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewaySku.java index 392a1d7b6c4..6ca5d861e9c 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewaySku.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewaySku.java @@ -16,14 +16,16 @@ public class VirtualNetworkGatewaySku { /** * Gateway SKU name. Possible values include: 'Basic', 'HighPerformance', - * 'Standard', 'UltraPerformance', 'VpnGw1', 'VpnGw2', 'VpnGw3'. + * 'Standard', 'UltraPerformance', 'VpnGw1', 'VpnGw2', 'VpnGw3', + * 'VpnGw1AZ', 'VpnGw2AZ', 'VpnGw3AZ', 'ErGw1AZ', 'ErGw2AZ', 'ErGw3AZ'. */ @JsonProperty(value = "name") private VirtualNetworkGatewaySkuName name; /** * Gateway SKU tier. Possible values include: 'Basic', 'HighPerformance', - * 'Standard', 'UltraPerformance', 'VpnGw1', 'VpnGw2', 'VpnGw3'. + * 'Standard', 'UltraPerformance', 'VpnGw1', 'VpnGw2', 'VpnGw3', + * 'VpnGw1AZ', 'VpnGw2AZ', 'VpnGw3AZ', 'ErGw1AZ', 'ErGw2AZ', 'ErGw3AZ'. */ @JsonProperty(value = "tier") private VirtualNetworkGatewaySkuTier tier; @@ -35,7 +37,7 @@ public class VirtualNetworkGatewaySku { private Integer capacity; /** - * Get the name value. + * Get gateway SKU name. Possible values include: 'Basic', 'HighPerformance', 'Standard', 'UltraPerformance', 'VpnGw1', 'VpnGw2', 'VpnGw3', 'VpnGw1AZ', 'VpnGw2AZ', 'VpnGw3AZ', 'ErGw1AZ', 'ErGw2AZ', 'ErGw3AZ'. * * @return the name value */ @@ -44,7 +46,7 @@ public VirtualNetworkGatewaySkuName name() { } /** - * Set the name value. + * Set gateway SKU name. Possible values include: 'Basic', 'HighPerformance', 'Standard', 'UltraPerformance', 'VpnGw1', 'VpnGw2', 'VpnGw3', 'VpnGw1AZ', 'VpnGw2AZ', 'VpnGw3AZ', 'ErGw1AZ', 'ErGw2AZ', 'ErGw3AZ'. * * @param name the name value to set * @return the VirtualNetworkGatewaySku object itself. @@ -55,7 +57,7 @@ public VirtualNetworkGatewaySku withName(VirtualNetworkGatewaySkuName name) { } /** - * Get the tier value. + * Get gateway SKU tier. Possible values include: 'Basic', 'HighPerformance', 'Standard', 'UltraPerformance', 'VpnGw1', 'VpnGw2', 'VpnGw3', 'VpnGw1AZ', 'VpnGw2AZ', 'VpnGw3AZ', 'ErGw1AZ', 'ErGw2AZ', 'ErGw3AZ'. * * @return the tier value */ @@ -64,7 +66,7 @@ public VirtualNetworkGatewaySkuTier tier() { } /** - * Set the tier value. + * Set gateway SKU tier. Possible values include: 'Basic', 'HighPerformance', 'Standard', 'UltraPerformance', 'VpnGw1', 'VpnGw2', 'VpnGw3', 'VpnGw1AZ', 'VpnGw2AZ', 'VpnGw3AZ', 'ErGw1AZ', 'ErGw2AZ', 'ErGw3AZ'. * * @param tier the tier value to set * @return the VirtualNetworkGatewaySku object itself. @@ -75,7 +77,7 @@ public VirtualNetworkGatewaySku withTier(VirtualNetworkGatewaySkuTier tier) { } /** - * Get the capacity value. + * Get the capacity. * * @return the capacity value */ @@ -84,7 +86,7 @@ public Integer capacity() { } /** - * Set the capacity value. + * Set the capacity. * * @param capacity the capacity value to set * @return the VirtualNetworkGatewaySku object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewaySkuName.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewaySkuName.java index 568790fde40..01f33696ddb 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewaySkuName.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewaySkuName.java @@ -8,67 +8,67 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for VirtualNetworkGatewaySkuName. */ -public final class VirtualNetworkGatewaySkuName { +public final class VirtualNetworkGatewaySkuName extends ExpandableStringEnum { /** Static value Basic for VirtualNetworkGatewaySkuName. */ - public static final VirtualNetworkGatewaySkuName BASIC = new VirtualNetworkGatewaySkuName("Basic"); + public static final VirtualNetworkGatewaySkuName BASIC = fromString("Basic"); /** Static value HighPerformance for VirtualNetworkGatewaySkuName. */ - public static final VirtualNetworkGatewaySkuName HIGH_PERFORMANCE = new VirtualNetworkGatewaySkuName("HighPerformance"); + public static final VirtualNetworkGatewaySkuName HIGH_PERFORMANCE = fromString("HighPerformance"); /** Static value Standard for VirtualNetworkGatewaySkuName. */ - public static final VirtualNetworkGatewaySkuName STANDARD = new VirtualNetworkGatewaySkuName("Standard"); + public static final VirtualNetworkGatewaySkuName STANDARD = fromString("Standard"); /** Static value UltraPerformance for VirtualNetworkGatewaySkuName. */ - public static final VirtualNetworkGatewaySkuName ULTRA_PERFORMANCE = new VirtualNetworkGatewaySkuName("UltraPerformance"); + public static final VirtualNetworkGatewaySkuName ULTRA_PERFORMANCE = fromString("UltraPerformance"); /** Static value VpnGw1 for VirtualNetworkGatewaySkuName. */ - public static final VirtualNetworkGatewaySkuName VPN_GW1 = new VirtualNetworkGatewaySkuName("VpnGw1"); + public static final VirtualNetworkGatewaySkuName VPN_GW1 = fromString("VpnGw1"); /** Static value VpnGw2 for VirtualNetworkGatewaySkuName. */ - public static final VirtualNetworkGatewaySkuName VPN_GW2 = new VirtualNetworkGatewaySkuName("VpnGw2"); + public static final VirtualNetworkGatewaySkuName VPN_GW2 = fromString("VpnGw2"); /** Static value VpnGw3 for VirtualNetworkGatewaySkuName. */ - public static final VirtualNetworkGatewaySkuName VPN_GW3 = new VirtualNetworkGatewaySkuName("VpnGw3"); + public static final VirtualNetworkGatewaySkuName VPN_GW3 = fromString("VpnGw3"); - private String value; + /** Static value VpnGw1AZ for VirtualNetworkGatewaySkuName. */ + public static final VirtualNetworkGatewaySkuName VPN_GW1AZ = fromString("VpnGw1AZ"); - /** - * Creates a custom value for VirtualNetworkGatewaySkuName. - * @param value the custom value - */ - public VirtualNetworkGatewaySkuName(String value) { - this.value = value; - } + /** Static value VpnGw2AZ for VirtualNetworkGatewaySkuName. */ + public static final VirtualNetworkGatewaySkuName VPN_GW2AZ = fromString("VpnGw2AZ"); - @JsonValue - @Override - public String toString() { - return value; - } + /** Static value VpnGw3AZ for VirtualNetworkGatewaySkuName. */ + public static final VirtualNetworkGatewaySkuName VPN_GW3AZ = fromString("VpnGw3AZ"); + + /** Static value ErGw1AZ for VirtualNetworkGatewaySkuName. */ + public static final VirtualNetworkGatewaySkuName ER_GW1AZ = fromString("ErGw1AZ"); + + /** Static value ErGw2AZ for VirtualNetworkGatewaySkuName. */ + public static final VirtualNetworkGatewaySkuName ER_GW2AZ = fromString("ErGw2AZ"); - @Override - public int hashCode() { - return value.hashCode(); + /** Static value ErGw3AZ for VirtualNetworkGatewaySkuName. */ + public static final VirtualNetworkGatewaySkuName ER_GW3AZ = fromString("ErGw3AZ"); + + /** + * Creates or finds a VirtualNetworkGatewaySkuName from its string representation. + * @param name a name to look for + * @return the corresponding VirtualNetworkGatewaySkuName + */ + @JsonCreator + public static VirtualNetworkGatewaySkuName fromString(String name) { + return fromString(name, VirtualNetworkGatewaySkuName.class); } - @Override - public boolean equals(Object obj) { - if (!(obj instanceof VirtualNetworkGatewaySkuName)) { - return false; - } - if (obj == this) { - return true; - } - VirtualNetworkGatewaySkuName rhs = (VirtualNetworkGatewaySkuName) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known VirtualNetworkGatewaySkuName values + */ + public static Collection values() { + return values(VirtualNetworkGatewaySkuName.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewaySkuTier.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewaySkuTier.java index 11917e628d6..4c6c19eb22d 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewaySkuTier.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewaySkuTier.java @@ -8,67 +8,67 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for VirtualNetworkGatewaySkuTier. */ -public final class VirtualNetworkGatewaySkuTier { +public final class VirtualNetworkGatewaySkuTier extends ExpandableStringEnum { /** Static value Basic for VirtualNetworkGatewaySkuTier. */ - public static final VirtualNetworkGatewaySkuTier BASIC = new VirtualNetworkGatewaySkuTier("Basic"); + public static final VirtualNetworkGatewaySkuTier BASIC = fromString("Basic"); /** Static value HighPerformance for VirtualNetworkGatewaySkuTier. */ - public static final VirtualNetworkGatewaySkuTier HIGH_PERFORMANCE = new VirtualNetworkGatewaySkuTier("HighPerformance"); + public static final VirtualNetworkGatewaySkuTier HIGH_PERFORMANCE = fromString("HighPerformance"); /** Static value Standard for VirtualNetworkGatewaySkuTier. */ - public static final VirtualNetworkGatewaySkuTier STANDARD = new VirtualNetworkGatewaySkuTier("Standard"); + public static final VirtualNetworkGatewaySkuTier STANDARD = fromString("Standard"); /** Static value UltraPerformance for VirtualNetworkGatewaySkuTier. */ - public static final VirtualNetworkGatewaySkuTier ULTRA_PERFORMANCE = new VirtualNetworkGatewaySkuTier("UltraPerformance"); + public static final VirtualNetworkGatewaySkuTier ULTRA_PERFORMANCE = fromString("UltraPerformance"); /** Static value VpnGw1 for VirtualNetworkGatewaySkuTier. */ - public static final VirtualNetworkGatewaySkuTier VPN_GW1 = new VirtualNetworkGatewaySkuTier("VpnGw1"); + public static final VirtualNetworkGatewaySkuTier VPN_GW1 = fromString("VpnGw1"); /** Static value VpnGw2 for VirtualNetworkGatewaySkuTier. */ - public static final VirtualNetworkGatewaySkuTier VPN_GW2 = new VirtualNetworkGatewaySkuTier("VpnGw2"); + public static final VirtualNetworkGatewaySkuTier VPN_GW2 = fromString("VpnGw2"); /** Static value VpnGw3 for VirtualNetworkGatewaySkuTier. */ - public static final VirtualNetworkGatewaySkuTier VPN_GW3 = new VirtualNetworkGatewaySkuTier("VpnGw3"); + public static final VirtualNetworkGatewaySkuTier VPN_GW3 = fromString("VpnGw3"); - private String value; + /** Static value VpnGw1AZ for VirtualNetworkGatewaySkuTier. */ + public static final VirtualNetworkGatewaySkuTier VPN_GW1AZ = fromString("VpnGw1AZ"); - /** - * Creates a custom value for VirtualNetworkGatewaySkuTier. - * @param value the custom value - */ - public VirtualNetworkGatewaySkuTier(String value) { - this.value = value; - } + /** Static value VpnGw2AZ for VirtualNetworkGatewaySkuTier. */ + public static final VirtualNetworkGatewaySkuTier VPN_GW2AZ = fromString("VpnGw2AZ"); - @JsonValue - @Override - public String toString() { - return value; - } + /** Static value VpnGw3AZ for VirtualNetworkGatewaySkuTier. */ + public static final VirtualNetworkGatewaySkuTier VPN_GW3AZ = fromString("VpnGw3AZ"); + + /** Static value ErGw1AZ for VirtualNetworkGatewaySkuTier. */ + public static final VirtualNetworkGatewaySkuTier ER_GW1AZ = fromString("ErGw1AZ"); + + /** Static value ErGw2AZ for VirtualNetworkGatewaySkuTier. */ + public static final VirtualNetworkGatewaySkuTier ER_GW2AZ = fromString("ErGw2AZ"); - @Override - public int hashCode() { - return value.hashCode(); + /** Static value ErGw3AZ for VirtualNetworkGatewaySkuTier. */ + public static final VirtualNetworkGatewaySkuTier ER_GW3AZ = fromString("ErGw3AZ"); + + /** + * Creates or finds a VirtualNetworkGatewaySkuTier from its string representation. + * @param name a name to look for + * @return the corresponding VirtualNetworkGatewaySkuTier + */ + @JsonCreator + public static VirtualNetworkGatewaySkuTier fromString(String name) { + return fromString(name, VirtualNetworkGatewaySkuTier.class); } - @Override - public boolean equals(Object obj) { - if (!(obj instanceof VirtualNetworkGatewaySkuTier)) { - return false; - } - if (obj == this) { - return true; - } - VirtualNetworkGatewaySkuTier rhs = (VirtualNetworkGatewaySkuTier) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known VirtualNetworkGatewaySkuTier values + */ + public static Collection values() { + return values(VirtualNetworkGatewaySkuTier.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewayType.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewayType.java index 8dfcac42d67..ffa7be90f28 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewayType.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewayType.java @@ -8,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for VirtualNetworkGatewayType. */ -public final class VirtualNetworkGatewayType { +public final class VirtualNetworkGatewayType extends ExpandableStringEnum { /** Static value Vpn for VirtualNetworkGatewayType. */ - public static final VirtualNetworkGatewayType VPN = new VirtualNetworkGatewayType("Vpn"); + public static final VirtualNetworkGatewayType VPN = fromString("Vpn"); /** Static value ExpressRoute for VirtualNetworkGatewayType. */ - public static final VirtualNetworkGatewayType EXPRESS_ROUTE = new VirtualNetworkGatewayType("ExpressRoute"); - - private String value; + public static final VirtualNetworkGatewayType EXPRESS_ROUTE = fromString("ExpressRoute"); /** - * Creates a custom value for VirtualNetworkGatewayType. - * @param value the custom value + * Creates or finds a VirtualNetworkGatewayType from its string representation. + * @param name a name to look for + * @return the corresponding VirtualNetworkGatewayType */ - public VirtualNetworkGatewayType(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static VirtualNetworkGatewayType fromString(String name) { + return fromString(name, VirtualNetworkGatewayType.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof VirtualNetworkGatewayType)) { - return false; - } - if (obj == this) { - return true; - } - VirtualNetworkGatewayType rhs = (VirtualNetworkGatewayType) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known VirtualNetworkGatewayType values + */ + public static Collection values() { + return values(VirtualNetworkGatewayType.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkPeeringState.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkPeeringState.java index 9dde89237c2..bcb267dfa83 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkPeeringState.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkPeeringState.java @@ -8,55 +8,37 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for VirtualNetworkPeeringState. */ -public final class VirtualNetworkPeeringState { +public final class VirtualNetworkPeeringState extends ExpandableStringEnum { /** Static value Initiated for VirtualNetworkPeeringState. */ - public static final VirtualNetworkPeeringState INITIATED = new VirtualNetworkPeeringState("Initiated"); + public static final VirtualNetworkPeeringState INITIATED = fromString("Initiated"); /** Static value Connected for VirtualNetworkPeeringState. */ - public static final VirtualNetworkPeeringState CONNECTED = new VirtualNetworkPeeringState("Connected"); + public static final VirtualNetworkPeeringState CONNECTED = fromString("Connected"); /** Static value Disconnected for VirtualNetworkPeeringState. */ - public static final VirtualNetworkPeeringState DISCONNECTED = new VirtualNetworkPeeringState("Disconnected"); - - private String value; + public static final VirtualNetworkPeeringState DISCONNECTED = fromString("Disconnected"); /** - * Creates a custom value for VirtualNetworkPeeringState. - * @param value the custom value + * Creates or finds a VirtualNetworkPeeringState from its string representation. + * @param name a name to look for + * @return the corresponding VirtualNetworkPeeringState */ - public VirtualNetworkPeeringState(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static VirtualNetworkPeeringState fromString(String name) { + return fromString(name, VirtualNetworkPeeringState.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof VirtualNetworkPeeringState)) { - return false; - } - if (obj == this) { - return true; - } - VirtualNetworkPeeringState rhs = (VirtualNetworkPeeringState) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known VirtualNetworkPeeringState values + */ + public static Collection values() { + return values(VirtualNetworkPeeringState.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkUsageName.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkUsageName.java index 28c55195a0b..89d79521ecc 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkUsageName.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkUsageName.java @@ -27,7 +27,7 @@ public class VirtualNetworkUsageName { private String value; /** - * Get the localizedValue value. + * Get localized subnet size and usage string. * * @return the localizedValue value */ @@ -36,7 +36,7 @@ public String localizedValue() { } /** - * Get the value value. + * Get subnet size and usage string. * * @return the value value */ diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VpnClientConfiguration.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VpnClientConfiguration.java index 0a2d18612b8..e53e88f6219 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VpnClientConfiguration.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VpnClientConfiguration.java @@ -42,6 +42,12 @@ public class VpnClientConfiguration { @JsonProperty(value = "vpnClientProtocols") private List vpnClientProtocols; + /** + * VpnClientIpsecPolicies for virtual network gateway P2S client. + */ + @JsonProperty(value = "vpnClientIpsecPolicies") + private List vpnClientIpsecPolicies; + /** * The radius server address property of the VirtualNetworkGateway resource * for vpn client connection. @@ -57,7 +63,7 @@ public class VpnClientConfiguration { private String radiusServerSecret; /** - * Get the vpnClientAddressPool value. + * Get the reference of the address space resource which represents Address space for P2S VpnClient. * * @return the vpnClientAddressPool value */ @@ -66,7 +72,7 @@ public AddressSpace vpnClientAddressPool() { } /** - * Set the vpnClientAddressPool value. + * Set the reference of the address space resource which represents Address space for P2S VpnClient. * * @param vpnClientAddressPool the vpnClientAddressPool value to set * @return the VpnClientConfiguration object itself. @@ -77,7 +83,7 @@ public VpnClientConfiguration withVpnClientAddressPool(AddressSpace vpnClientAdd } /** - * Get the vpnClientRootCertificates value. + * Get vpnClientRootCertificate for virtual network gateway. * * @return the vpnClientRootCertificates value */ @@ -86,7 +92,7 @@ public List vpnClientRootCertificates() { } /** - * Set the vpnClientRootCertificates value. + * Set vpnClientRootCertificate for virtual network gateway. * * @param vpnClientRootCertificates the vpnClientRootCertificates value to set * @return the VpnClientConfiguration object itself. @@ -97,7 +103,7 @@ public VpnClientConfiguration withVpnClientRootCertificates(List vpnClientRevokedCertificates() { } /** - * Set the vpnClientRevokedCertificates value. + * Set vpnClientRevokedCertificate for Virtual network gateway. * * @param vpnClientRevokedCertificates the vpnClientRevokedCertificates value to set * @return the VpnClientConfiguration object itself. @@ -117,7 +123,7 @@ public VpnClientConfiguration withVpnClientRevokedCertificates(List vpnClientProtocols() { } /** - * Set the vpnClientProtocols value. + * Set vpnClientProtocols for Virtual network gateway. * * @param vpnClientProtocols the vpnClientProtocols value to set * @return the VpnClientConfiguration object itself. @@ -137,7 +143,27 @@ public VpnClientConfiguration withVpnClientProtocols(List vpn } /** - * Get the radiusServerAddress value. + * Get vpnClientIpsecPolicies for virtual network gateway P2S client. + * + * @return the vpnClientIpsecPolicies value + */ + public List vpnClientIpsecPolicies() { + return this.vpnClientIpsecPolicies; + } + + /** + * Set vpnClientIpsecPolicies for virtual network gateway P2S client. + * + * @param vpnClientIpsecPolicies the vpnClientIpsecPolicies value to set + * @return the VpnClientConfiguration object itself. + */ + public VpnClientConfiguration withVpnClientIpsecPolicies(List vpnClientIpsecPolicies) { + this.vpnClientIpsecPolicies = vpnClientIpsecPolicies; + return this; + } + + /** + * Get the radius server address property of the VirtualNetworkGateway resource for vpn client connection. * * @return the radiusServerAddress value */ @@ -146,7 +172,7 @@ public String radiusServerAddress() { } /** - * Set the radiusServerAddress value. + * Set the radius server address property of the VirtualNetworkGateway resource for vpn client connection. * * @param radiusServerAddress the radiusServerAddress value to set * @return the VpnClientConfiguration object itself. @@ -157,7 +183,7 @@ public VpnClientConfiguration withRadiusServerAddress(String radiusServerAddress } /** - * Get the radiusServerSecret value. + * Get the radius secret property of the VirtualNetworkGateway resource for vpn client connection. * * @return the radiusServerSecret value */ @@ -166,7 +192,7 @@ public String radiusServerSecret() { } /** - * Set the radiusServerSecret value. + * Set the radius secret property of the VirtualNetworkGateway resource for vpn client connection. * * @param radiusServerSecret the radiusServerSecret value to set * @return the VpnClientConfiguration object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VpnClientIPsecParameters.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VpnClientIPsecParameters.java new file mode 100644 index 00000000000..4305cfe2384 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VpnClientIPsecParameters.java @@ -0,0 +1,236 @@ +/** + * 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.network; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * An IPSec parameters for a virtual network gateway P2S connection. + */ +public class VpnClientIPsecParameters { + /** + * The IPSec Security Association (also called Quick Mode or Phase 2 SA) + * lifetime in seconds for P2S client. + */ + @JsonProperty(value = "saLifeTimeSeconds", required = true) + private int saLifeTimeSeconds; + + /** + * The IPSec Security Association (also called Quick Mode or Phase 2 SA) + * payload size in KB for P2S client.. + */ + @JsonProperty(value = "saDataSizeKilobytes", required = true) + private int saDataSizeKilobytes; + + /** + * The IPSec encryption algorithm (IKE phase 1). Possible values include: + * 'None', 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES128', + * 'GCMAES192', 'GCMAES256'. + */ + @JsonProperty(value = "ipsecEncryption", required = true) + private IpsecEncryption ipsecEncryption; + + /** + * The IPSec integrity algorithm (IKE phase 1). Possible values include: + * 'MD5', 'SHA1', 'SHA256', 'GCMAES128', 'GCMAES192', 'GCMAES256'. + */ + @JsonProperty(value = "ipsecIntegrity", required = true) + private IpsecIntegrity ipsecIntegrity; + + /** + * The IKE encryption algorithm (IKE phase 2). Possible values include: + * 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'. + */ + @JsonProperty(value = "ikeEncryption", required = true) + private IkeEncryption ikeEncryption; + + /** + * The IKE integrity algorithm (IKE phase 2). Possible values include: + * 'MD5', 'SHA1', 'SHA256', 'SHA384', 'GCMAES256', 'GCMAES128'. + */ + @JsonProperty(value = "ikeIntegrity", required = true) + private IkeIntegrity ikeIntegrity; + + /** + * The DH Groups used in IKE Phase 1 for initial SA. Possible values + * include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', + * 'ECP256', 'ECP384', 'DHGroup24'. + */ + @JsonProperty(value = "dhGroup", required = true) + private DhGroup dhGroup; + + /** + * The Pfs Groups used in IKE Phase 2 for new child SA. Possible values + * include: 'None', 'PFS1', 'PFS2', 'PFS2048', 'ECP256', 'ECP384', 'PFS24', + * 'PFS14', 'PFSMM'. + */ + @JsonProperty(value = "pfsGroup", required = true) + private PfsGroup pfsGroup; + + /** + * Get the IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for P2S client. + * + * @return the saLifeTimeSeconds value + */ + public int saLifeTimeSeconds() { + return this.saLifeTimeSeconds; + } + + /** + * Set the IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for P2S client. + * + * @param saLifeTimeSeconds the saLifeTimeSeconds value to set + * @return the VpnClientIPsecParameters object itself. + */ + public VpnClientIPsecParameters withSaLifeTimeSeconds(int saLifeTimeSeconds) { + this.saLifeTimeSeconds = saLifeTimeSeconds; + return this; + } + + /** + * Get the IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for P2S client.. + * + * @return the saDataSizeKilobytes value + */ + public int saDataSizeKilobytes() { + return this.saDataSizeKilobytes; + } + + /** + * Set the IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for P2S client.. + * + * @param saDataSizeKilobytes the saDataSizeKilobytes value to set + * @return the VpnClientIPsecParameters object itself. + */ + public VpnClientIPsecParameters withSaDataSizeKilobytes(int saDataSizeKilobytes) { + this.saDataSizeKilobytes = saDataSizeKilobytes; + return this; + } + + /** + * Get the IPSec encryption algorithm (IKE phase 1). Possible values include: 'None', 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES128', 'GCMAES192', 'GCMAES256'. + * + * @return the ipsecEncryption value + */ + public IpsecEncryption ipsecEncryption() { + return this.ipsecEncryption; + } + + /** + * Set the IPSec encryption algorithm (IKE phase 1). Possible values include: 'None', 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES128', 'GCMAES192', 'GCMAES256'. + * + * @param ipsecEncryption the ipsecEncryption value to set + * @return the VpnClientIPsecParameters object itself. + */ + public VpnClientIPsecParameters withIpsecEncryption(IpsecEncryption ipsecEncryption) { + this.ipsecEncryption = ipsecEncryption; + return this; + } + + /** + * Get the IPSec integrity algorithm (IKE phase 1). Possible values include: 'MD5', 'SHA1', 'SHA256', 'GCMAES128', 'GCMAES192', 'GCMAES256'. + * + * @return the ipsecIntegrity value + */ + public IpsecIntegrity ipsecIntegrity() { + return this.ipsecIntegrity; + } + + /** + * Set the IPSec integrity algorithm (IKE phase 1). Possible values include: 'MD5', 'SHA1', 'SHA256', 'GCMAES128', 'GCMAES192', 'GCMAES256'. + * + * @param ipsecIntegrity the ipsecIntegrity value to set + * @return the VpnClientIPsecParameters object itself. + */ + public VpnClientIPsecParameters withIpsecIntegrity(IpsecIntegrity ipsecIntegrity) { + this.ipsecIntegrity = ipsecIntegrity; + return this; + } + + /** + * Get the IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'. + * + * @return the ikeEncryption value + */ + public IkeEncryption ikeEncryption() { + return this.ikeEncryption; + } + + /** + * Set the IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'. + * + * @param ikeEncryption the ikeEncryption value to set + * @return the VpnClientIPsecParameters object itself. + */ + public VpnClientIPsecParameters withIkeEncryption(IkeEncryption ikeEncryption) { + this.ikeEncryption = ikeEncryption; + return this; + } + + /** + * Get the IKE integrity algorithm (IKE phase 2). Possible values include: 'MD5', 'SHA1', 'SHA256', 'SHA384', 'GCMAES256', 'GCMAES128'. + * + * @return the ikeIntegrity value + */ + public IkeIntegrity ikeIntegrity() { + return this.ikeIntegrity; + } + + /** + * Set the IKE integrity algorithm (IKE phase 2). Possible values include: 'MD5', 'SHA1', 'SHA256', 'SHA384', 'GCMAES256', 'GCMAES128'. + * + * @param ikeIntegrity the ikeIntegrity value to set + * @return the VpnClientIPsecParameters object itself. + */ + public VpnClientIPsecParameters withIkeIntegrity(IkeIntegrity ikeIntegrity) { + this.ikeIntegrity = ikeIntegrity; + return this; + } + + /** + * Get the DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'. + * + * @return the dhGroup value + */ + public DhGroup dhGroup() { + return this.dhGroup; + } + + /** + * Set the DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'. + * + * @param dhGroup the dhGroup value to set + * @return the VpnClientIPsecParameters object itself. + */ + public VpnClientIPsecParameters withDhGroup(DhGroup dhGroup) { + this.dhGroup = dhGroup; + return this; + } + + /** + * Get the Pfs Groups used in IKE Phase 2 for new child SA. Possible values include: 'None', 'PFS1', 'PFS2', 'PFS2048', 'ECP256', 'ECP384', 'PFS24', 'PFS14', 'PFSMM'. + * + * @return the pfsGroup value + */ + public PfsGroup pfsGroup() { + return this.pfsGroup; + } + + /** + * Set the Pfs Groups used in IKE Phase 2 for new child SA. Possible values include: 'None', 'PFS1', 'PFS2', 'PFS2048', 'ECP256', 'ECP384', 'PFS24', 'PFS14', 'PFSMM'. + * + * @param pfsGroup the pfsGroup value to set + * @return the VpnClientIPsecParameters object itself. + */ + public VpnClientIPsecParameters withPfsGroup(PfsGroup pfsGroup) { + this.pfsGroup = pfsGroup; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VpnClientParameters.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VpnClientParameters.java new file mode 100644 index 00000000000..6f1c499240c --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VpnClientParameters.java @@ -0,0 +1,128 @@ +/** + * 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.network; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Vpn Client Parameters for package generation. + */ +public class VpnClientParameters { + /** + * VPN client Processor Architecture. Possible values are: 'AMD64' and + * 'X86'. Possible values include: 'Amd64', 'X86'. + */ + @JsonProperty(value = "processorArchitecture") + private ProcessorArchitecture processorArchitecture; + + /** + * VPN client Authentication Method. Possible values are: 'EAPTLS' and + * 'EAPMSCHAPv2'. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'. + */ + @JsonProperty(value = "authenticationMethod") + private AuthenticationMethod authenticationMethod; + + /** + * The public certificate data for the radius server authentication + * certificate as a Base-64 encoded string. Required only if external + * radius authentication has been configured with EAPTLS authentication. + */ + @JsonProperty(value = "radiusServerAuthCertificate") + private String radiusServerAuthCertificate; + + /** + * A list of client root certificates public certificate data encoded as + * Base-64 strings. Optional parameter for external radius based + * authentication with EAPTLS. + */ + @JsonProperty(value = "clientRootCertificates") + private List clientRootCertificates; + + /** + * Get vPN client Processor Architecture. Possible values are: 'AMD64' and 'X86'. Possible values include: 'Amd64', 'X86'. + * + * @return the processorArchitecture value + */ + public ProcessorArchitecture processorArchitecture() { + return this.processorArchitecture; + } + + /** + * Set vPN client Processor Architecture. Possible values are: 'AMD64' and 'X86'. Possible values include: 'Amd64', 'X86'. + * + * @param processorArchitecture the processorArchitecture value to set + * @return the VpnClientParameters object itself. + */ + public VpnClientParameters withProcessorArchitecture(ProcessorArchitecture processorArchitecture) { + this.processorArchitecture = processorArchitecture; + return this; + } + + /** + * Get vPN client Authentication Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'. + * + * @return the authenticationMethod value + */ + public AuthenticationMethod authenticationMethod() { + return this.authenticationMethod; + } + + /** + * Set vPN client Authentication Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'. + * + * @param authenticationMethod the authenticationMethod value to set + * @return the VpnClientParameters object itself. + */ + public VpnClientParameters withAuthenticationMethod(AuthenticationMethod authenticationMethod) { + this.authenticationMethod = authenticationMethod; + return this; + } + + /** + * Get the public certificate data for the radius server authentication certificate as a Base-64 encoded string. Required only if external radius authentication has been configured with EAPTLS authentication. + * + * @return the radiusServerAuthCertificate value + */ + public String radiusServerAuthCertificate() { + return this.radiusServerAuthCertificate; + } + + /** + * Set the public certificate data for the radius server authentication certificate as a Base-64 encoded string. Required only if external radius authentication has been configured with EAPTLS authentication. + * + * @param radiusServerAuthCertificate the radiusServerAuthCertificate value to set + * @return the VpnClientParameters object itself. + */ + public VpnClientParameters withRadiusServerAuthCertificate(String radiusServerAuthCertificate) { + this.radiusServerAuthCertificate = radiusServerAuthCertificate; + return this; + } + + /** + * Get a list of client root certificates public certificate data encoded as Base-64 strings. Optional parameter for external radius based authentication with EAPTLS. + * + * @return the clientRootCertificates value + */ + public List clientRootCertificates() { + return this.clientRootCertificates; + } + + /** + * Set a list of client root certificates public certificate data encoded as Base-64 strings. Optional parameter for external radius based authentication with EAPTLS. + * + * @param clientRootCertificates the clientRootCertificates value to set + * @return the VpnClientParameters object itself. + */ + public VpnClientParameters withClientRootCertificates(List clientRootCertificates) { + this.clientRootCertificates = clientRootCertificates; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VpnClientProtocol.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VpnClientProtocol.java index ba668e8b825..a7fe2adcbb7 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VpnClientProtocol.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VpnClientProtocol.java @@ -8,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for VpnClientProtocol. */ -public final class VpnClientProtocol { +public final class VpnClientProtocol extends ExpandableStringEnum { /** Static value IkeV2 for VpnClientProtocol. */ - public static final VpnClientProtocol IKE_V2 = new VpnClientProtocol("IkeV2"); + public static final VpnClientProtocol IKE_V2 = fromString("IkeV2"); /** Static value SSTP for VpnClientProtocol. */ - public static final VpnClientProtocol SSTP = new VpnClientProtocol("SSTP"); - - private String value; + public static final VpnClientProtocol SSTP = fromString("SSTP"); /** - * Creates a custom value for VpnClientProtocol. - * @param value the custom value + * Creates or finds a VpnClientProtocol from its string representation. + * @param name a name to look for + * @return the corresponding VpnClientProtocol */ - public VpnClientProtocol(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static VpnClientProtocol fromString(String name) { + return fromString(name, VpnClientProtocol.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof VpnClientProtocol)) { - return false; - } - if (obj == this) { - return true; - } - VpnClientProtocol rhs = (VpnClientProtocol) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known VpnClientProtocol values + */ + public static Collection values() { + return values(VpnClientProtocol.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VpnDeviceScriptParameters.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VpnDeviceScriptParameters.java new file mode 100644 index 00000000000..8abab5b27cc --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VpnDeviceScriptParameters.java @@ -0,0 +1,95 @@ +/** + * 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.network; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Vpn device configuration script generation parameters. + */ +public class VpnDeviceScriptParameters { + /** + * The vendor for the vpn device. + */ + @JsonProperty(value = "vendor") + private String vendor; + + /** + * The device family for the vpn device. + */ + @JsonProperty(value = "deviceFamily") + private String deviceFamily; + + /** + * The firmware version for the vpn device. + */ + @JsonProperty(value = "firmwareVersion") + private String firmwareVersion; + + /** + * Get the vendor for the vpn device. + * + * @return the vendor value + */ + public String vendor() { + return this.vendor; + } + + /** + * Set the vendor for the vpn device. + * + * @param vendor the vendor value to set + * @return the VpnDeviceScriptParameters object itself. + */ + public VpnDeviceScriptParameters withVendor(String vendor) { + this.vendor = vendor; + return this; + } + + /** + * Get the device family for the vpn device. + * + * @return the deviceFamily value + */ + public String deviceFamily() { + return this.deviceFamily; + } + + /** + * Set the device family for the vpn device. + * + * @param deviceFamily the deviceFamily value to set + * @return the VpnDeviceScriptParameters object itself. + */ + public VpnDeviceScriptParameters withDeviceFamily(String deviceFamily) { + this.deviceFamily = deviceFamily; + return this; + } + + /** + * Get the firmware version for the vpn device. + * + * @return the firmwareVersion value + */ + public String firmwareVersion() { + return this.firmwareVersion; + } + + /** + * Set the firmware version for the vpn device. + * + * @param firmwareVersion the firmwareVersion value to set + * @return the VpnDeviceScriptParameters object itself. + */ + public VpnDeviceScriptParameters withFirmwareVersion(String firmwareVersion) { + this.firmwareVersion = firmwareVersion; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VpnType.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VpnType.java index 2c2ceb07d4f..f1d84d48518 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VpnType.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VpnType.java @@ -8,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for VpnType. */ -public final class VpnType { +public final class VpnType extends ExpandableStringEnum { /** Static value PolicyBased for VpnType. */ - public static final VpnType POLICY_BASED = new VpnType("PolicyBased"); + public static final VpnType POLICY_BASED = fromString("PolicyBased"); /** Static value RouteBased for VpnType. */ - public static final VpnType ROUTE_BASED = new VpnType("RouteBased"); - - private String value; + public static final VpnType ROUTE_BASED = fromString("RouteBased"); /** - * Creates a custom value for VpnType. - * @param value the custom value + * Creates or finds a VpnType from its string representation. + * @param name a name to look for + * @return the corresponding VpnType */ - public VpnType(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static VpnType fromString(String name) { + return fromString(name, VpnType.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof VpnType)) { - return false; - } - if (obj == this) { - return true; - } - VpnType rhs = (VpnType) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known VpnType values + */ + public static Collection values() { + return values(VpnType.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationGatewayAuthenticationCertificateInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationGatewayAuthenticationCertificateInner.java index 09baa49e52f..f5263c9069a 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationGatewayAuthenticationCertificateInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationGatewayAuthenticationCertificateInner.java @@ -31,8 +31,8 @@ public class ApplicationGatewayAuthenticationCertificateInner extends SubResourc private String provisioningState; /** - * Name of the resource that is unique within a resource group. This name - * can be used to access the resource. + * Name of the authentication certificate that is unique within an + * Application Gateway. */ @JsonProperty(value = "name") private String name; @@ -50,7 +50,7 @@ public class ApplicationGatewayAuthenticationCertificateInner extends SubResourc private String type; /** - * Get the data value. + * Get certificate public data. * * @return the data value */ @@ -59,7 +59,7 @@ public String data() { } /** - * Set the data value. + * Set certificate public data. * * @param data the data value to set * @return the ApplicationGatewayAuthenticationCertificateInner object itself. @@ -70,7 +70,7 @@ public ApplicationGatewayAuthenticationCertificateInner withData(String data) { } /** - * Get the provisioningState value. + * Get provisioning state of the authentication certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. * * @return the provisioningState value */ @@ -79,7 +79,7 @@ public String provisioningState() { } /** - * Set the provisioningState value. + * Set provisioning state of the authentication certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. * * @param provisioningState the provisioningState value to set * @return the ApplicationGatewayAuthenticationCertificateInner object itself. @@ -90,7 +90,7 @@ public ApplicationGatewayAuthenticationCertificateInner withProvisioningState(St } /** - * Get the name value. + * Get name of the authentication certificate that is unique within an Application Gateway. * * @return the name value */ @@ -99,7 +99,7 @@ public String name() { } /** - * Set the name value. + * Set name of the authentication certificate that is unique within an Application Gateway. * * @param name the name value to set * @return the ApplicationGatewayAuthenticationCertificateInner object itself. @@ -110,7 +110,7 @@ public ApplicationGatewayAuthenticationCertificateInner withName(String name) { } /** - * Get the etag value. + * Get a unique read-only string that changes whenever the resource is updated. * * @return the etag value */ @@ -119,7 +119,7 @@ public String etag() { } /** - * Set the etag value. + * Set a unique read-only string that changes whenever the resource is updated. * * @param etag the etag value to set * @return the ApplicationGatewayAuthenticationCertificateInner object itself. @@ -130,7 +130,7 @@ public ApplicationGatewayAuthenticationCertificateInner withEtag(String etag) { } /** - * Get the type value. + * Get type of the resource. * * @return the type value */ @@ -139,7 +139,7 @@ public String type() { } /** - * Set the type value. + * Set type of the resource. * * @param type the type value to set * @return the ApplicationGatewayAuthenticationCertificateInner object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationGatewayAvailableSslOptionsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationGatewayAvailableSslOptionsInner.java index 93af3eba11d..20eb1de3aa8 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationGatewayAvailableSslOptionsInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationGatewayAvailableSslOptionsInner.java @@ -15,12 +15,14 @@ import com.microsoft.azure.management.network.ApplicationGatewaySslProtocol; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; import com.microsoft.azure.Resource; /** * Response for ApplicationGatewayAvailableSslOptions API service call. */ @JsonFlatten +@SkipParentValidation public class ApplicationGatewayAvailableSslOptionsInner extends Resource { /** * List of available Ssl predefined policy. @@ -49,7 +51,13 @@ public class ApplicationGatewayAvailableSslOptionsInner extends Resource { private List availableProtocols; /** - * Get the predefinedPolicies value. + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get list of available Ssl predefined policy. * * @return the predefinedPolicies value */ @@ -58,7 +66,7 @@ public List predefinedPolicies() { } /** - * Set the predefinedPolicies value. + * Set list of available Ssl predefined policy. * * @param predefinedPolicies the predefinedPolicies value to set * @return the ApplicationGatewayAvailableSslOptionsInner object itself. @@ -69,7 +77,7 @@ public ApplicationGatewayAvailableSslOptionsInner withPredefinedPolicies(List availableCipherSuites() { } /** - * Set the availableCipherSuites value. + * Set list of available Ssl cipher suites. * * @param availableCipherSuites the availableCipherSuites value to set * @return the ApplicationGatewayAvailableSslOptionsInner object itself. @@ -109,7 +117,7 @@ public ApplicationGatewayAvailableSslOptionsInner withAvailableCipherSuites(List } /** - * Get the availableProtocols value. + * Get list of available Ssl protocols. * * @return the availableProtocols value */ @@ -118,7 +126,7 @@ public List availableProtocols() { } /** - * Set the availableProtocols value. + * Set list of available Ssl protocols. * * @param availableProtocols the availableProtocols value to set * @return the ApplicationGatewayAvailableSslOptionsInner object itself. @@ -128,4 +136,24 @@ public ApplicationGatewayAvailableSslOptionsInner withAvailableProtocols(List value; /** - * Get the value value. + * Get the list of application gateway rule sets. * * @return the value value */ @@ -31,7 +31,7 @@ public List value() { } /** - * Set the value value. + * Set the list of application gateway rule sets. * * @param value the value value to set * @return the ApplicationGatewayAvailableWafRuleSetsResultInner object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationGatewayBackendAddressPoolInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationGatewayBackendAddressPoolInner.java index 93c82fea877..54fbd06388b 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationGatewayBackendAddressPoolInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationGatewayBackendAddressPoolInner.java @@ -39,8 +39,8 @@ public class ApplicationGatewayBackendAddressPoolInner extends SubResource { private String provisioningState; /** - * Resource that is unique within a resource group. This name can be used - * to access the resource. + * Name of the backend address pool that is unique within an Application + * Gateway. */ @JsonProperty(value = "name") private String name; @@ -58,7 +58,7 @@ public class ApplicationGatewayBackendAddressPoolInner extends SubResource { private String type; /** - * Get the backendIPConfigurations value. + * Get collection of references to IPs defined in network interfaces. * * @return the backendIPConfigurations value */ @@ -67,7 +67,7 @@ public List backendIPConfigurations() { } /** - * Set the backendIPConfigurations value. + * Set collection of references to IPs defined in network interfaces. * * @param backendIPConfigurations the backendIPConfigurations value to set * @return the ApplicationGatewayBackendAddressPoolInner object itself. @@ -78,7 +78,7 @@ public ApplicationGatewayBackendAddressPoolInner withBackendIPConfigurations(Lis } /** - * Get the backendAddresses value. + * Get backend addresses. * * @return the backendAddresses value */ @@ -87,7 +87,7 @@ public List backendAddresses() { } /** - * Set the backendAddresses value. + * Set backend addresses. * * @param backendAddresses the backendAddresses value to set * @return the ApplicationGatewayBackendAddressPoolInner object itself. @@ -98,7 +98,7 @@ public ApplicationGatewayBackendAddressPoolInner withBackendAddresses(List authenticationCertificates() { } /** - * Set the authenticationCertificates value. + * Set array of references to application gateway authentication certificates. * * @param authenticationCertificates the authenticationCertificates value to set * @return the ApplicationGatewayBackendHttpSettingsInner object itself. @@ -244,7 +245,7 @@ public ApplicationGatewayBackendHttpSettingsInner withAuthenticationCertificates } /** - * Get the connectionDraining value. + * Get connection draining of the backend http settings resource. * * @return the connectionDraining value */ @@ -253,7 +254,7 @@ public ApplicationGatewayConnectionDraining connectionDraining() { } /** - * Set the connectionDraining value. + * Set connection draining of the backend http settings resource. * * @param connectionDraining the connectionDraining value to set * @return the ApplicationGatewayBackendHttpSettingsInner object itself. @@ -264,7 +265,7 @@ public ApplicationGatewayBackendHttpSettingsInner withConnectionDraining(Applica } /** - * Get the hostName value. + * Get host header to be sent to the backend servers. * * @return the hostName value */ @@ -273,7 +274,7 @@ public String hostName() { } /** - * Set the hostName value. + * Set host header to be sent to the backend servers. * * @param hostName the hostName value to set * @return the ApplicationGatewayBackendHttpSettingsInner object itself. @@ -284,7 +285,7 @@ public ApplicationGatewayBackendHttpSettingsInner withHostName(String hostName) } /** - * Get the pickHostNameFromBackendAddress value. + * Get whether to pick host header should be picked from the host name of the backend server. Default value is false. * * @return the pickHostNameFromBackendAddress value */ @@ -293,7 +294,7 @@ public Boolean pickHostNameFromBackendAddress() { } /** - * Set the pickHostNameFromBackendAddress value. + * Set whether to pick host header should be picked from the host name of the backend server. Default value is false. * * @param pickHostNameFromBackendAddress the pickHostNameFromBackendAddress value to set * @return the ApplicationGatewayBackendHttpSettingsInner object itself. @@ -304,7 +305,7 @@ public ApplicationGatewayBackendHttpSettingsInner withPickHostNameFromBackendAdd } /** - * Get the affinityCookieName value. + * Get cookie name to use for the affinity cookie. * * @return the affinityCookieName value */ @@ -313,7 +314,7 @@ public String affinityCookieName() { } /** - * Set the affinityCookieName value. + * Set cookie name to use for the affinity cookie. * * @param affinityCookieName the affinityCookieName value to set * @return the ApplicationGatewayBackendHttpSettingsInner object itself. @@ -324,7 +325,7 @@ public ApplicationGatewayBackendHttpSettingsInner withAffinityCookieName(String } /** - * Get the probeEnabled value. + * Get whether the probe is enabled. Default value is false. * * @return the probeEnabled value */ @@ -333,7 +334,7 @@ public Boolean probeEnabled() { } /** - * Set the probeEnabled value. + * Set whether the probe is enabled. Default value is false. * * @param probeEnabled the probeEnabled value to set * @return the ApplicationGatewayBackendHttpSettingsInner object itself. @@ -344,7 +345,7 @@ public ApplicationGatewayBackendHttpSettingsInner withProbeEnabled(Boolean probe } /** - * Get the path value. + * Get path which should be used as a prefix for all HTTP requests. Null means no path will be prefixed. Default value is null. * * @return the path value */ @@ -353,7 +354,7 @@ public String path() { } /** - * Set the path value. + * Set path which should be used as a prefix for all HTTP requests. Null means no path will be prefixed. Default value is null. * * @param path the path value to set * @return the ApplicationGatewayBackendHttpSettingsInner object itself. @@ -364,7 +365,7 @@ public ApplicationGatewayBackendHttpSettingsInner withPath(String path) { } /** - * Get the provisioningState value. + * Get provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. * * @return the provisioningState value */ @@ -373,7 +374,7 @@ public String provisioningState() { } /** - * Set the provisioningState value. + * Set provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. * * @param provisioningState the provisioningState value to set * @return the ApplicationGatewayBackendHttpSettingsInner object itself. @@ -384,7 +385,7 @@ public ApplicationGatewayBackendHttpSettingsInner withProvisioningState(String p } /** - * Get the name value. + * Get name of the backend http settings that is unique within an Application Gateway. * * @return the name value */ @@ -393,7 +394,7 @@ public String name() { } /** - * Set the name value. + * Set name of the backend http settings that is unique within an Application Gateway. * * @param name the name value to set * @return the ApplicationGatewayBackendHttpSettingsInner object itself. @@ -404,7 +405,7 @@ public ApplicationGatewayBackendHttpSettingsInner withName(String name) { } /** - * Get the etag value. + * Get a unique read-only string that changes whenever the resource is updated. * * @return the etag value */ @@ -413,7 +414,7 @@ public String etag() { } /** - * Set the etag value. + * Set a unique read-only string that changes whenever the resource is updated. * * @param etag the etag value to set * @return the ApplicationGatewayBackendHttpSettingsInner object itself. @@ -424,7 +425,7 @@ public ApplicationGatewayBackendHttpSettingsInner withEtag(String etag) { } /** - * Get the type value. + * Get type of the resource. * * @return the type value */ @@ -433,7 +434,7 @@ public String type() { } /** - * Set the type value. + * Set type of the resource. * * @param type the type value to set * @return the ApplicationGatewayBackendHttpSettingsInner object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationGatewayFirewallRuleSetInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationGatewayFirewallRuleSetInner.java index ce526558d20..656a94d53bb 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationGatewayFirewallRuleSetInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationGatewayFirewallRuleSetInner.java @@ -12,12 +12,14 @@ import com.microsoft.azure.management.network.ApplicationGatewayFirewallRuleGroup; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; import com.microsoft.azure.Resource; /** * A web application firewall rule set. */ @JsonFlatten +@SkipParentValidation public class ApplicationGatewayFirewallRuleSetInner extends Resource { /** * The provisioning state of the web application firewall rule set. @@ -44,7 +46,13 @@ public class ApplicationGatewayFirewallRuleSetInner extends Resource { private List ruleGroups; /** - * Get the provisioningState value. + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get the provisioning state of the web application firewall rule set. * * @return the provisioningState value */ @@ -53,7 +61,7 @@ public String provisioningState() { } /** - * Set the provisioningState value. + * Set the provisioning state of the web application firewall rule set. * * @param provisioningState the provisioningState value to set * @return the ApplicationGatewayFirewallRuleSetInner object itself. @@ -64,7 +72,7 @@ public ApplicationGatewayFirewallRuleSetInner withProvisioningState(String provi } /** - * Get the ruleSetType value. + * Get the type of the web application firewall rule set. * * @return the ruleSetType value */ @@ -73,7 +81,7 @@ public String ruleSetType() { } /** - * Set the ruleSetType value. + * Set the type of the web application firewall rule set. * * @param ruleSetType the ruleSetType value to set * @return the ApplicationGatewayFirewallRuleSetInner object itself. @@ -84,7 +92,7 @@ public ApplicationGatewayFirewallRuleSetInner withRuleSetType(String ruleSetType } /** - * Get the ruleSetVersion value. + * Get the version of the web application firewall rule set type. * * @return the ruleSetVersion value */ @@ -93,7 +101,7 @@ public String ruleSetVersion() { } /** - * Set the ruleSetVersion value. + * Set the version of the web application firewall rule set type. * * @param ruleSetVersion the ruleSetVersion value to set * @return the ApplicationGatewayFirewallRuleSetInner object itself. @@ -104,7 +112,7 @@ public ApplicationGatewayFirewallRuleSetInner withRuleSetVersion(String ruleSetV } /** - * Get the ruleGroups value. + * Get the rule groups of the web application firewall rule set. * * @return the ruleGroups value */ @@ -113,7 +121,7 @@ public List ruleGroups() { } /** - * Set the ruleGroups value. + * Set the rule groups of the web application firewall rule set. * * @param ruleGroups the ruleGroups value to set * @return the ApplicationGatewayFirewallRuleSetInner object itself. @@ -123,4 +131,24 @@ public ApplicationGatewayFirewallRuleSetInner withRuleGroups(List zones; + @JsonProperty(value = "id") + private String id; /** - * Get the sku value. + * Get sKU of the application gateway resource. * * @return the sku value */ @@ -154,7 +162,7 @@ public ApplicationGatewaySku sku() { } /** - * Set the sku value. + * Set sKU of the application gateway resource. * * @param sku the sku value to set * @return the ApplicationGatewayInner object itself. @@ -165,7 +173,7 @@ public ApplicationGatewayInner withSku(ApplicationGatewaySku sku) { } /** - * Get the sslPolicy value. + * Get sSL policy of the application gateway resource. * * @return the sslPolicy value */ @@ -174,7 +182,7 @@ public ApplicationGatewaySslPolicy sslPolicy() { } /** - * Set the sslPolicy value. + * Set sSL policy of the application gateway resource. * * @param sslPolicy the sslPolicy value to set * @return the ApplicationGatewayInner object itself. @@ -185,7 +193,7 @@ public ApplicationGatewayInner withSslPolicy(ApplicationGatewaySslPolicy sslPoli } /** - * Get the operationalState value. + * Get operational state of the application gateway resource. Possible values include: 'Stopped', 'Starting', 'Running', 'Stopping'. * * @return the operationalState value */ @@ -194,7 +202,7 @@ public ApplicationGatewayOperationalState operationalState() { } /** - * Get the gatewayIPConfigurations value. + * Get subnets of application the gateway resource. * * @return the gatewayIPConfigurations value */ @@ -203,7 +211,7 @@ public List gatewayIPConfigurations() { } /** - * Set the gatewayIPConfigurations value. + * Set subnets of application the gateway resource. * * @param gatewayIPConfigurations the gatewayIPConfigurations value to set * @return the ApplicationGatewayInner object itself. @@ -214,7 +222,7 @@ public ApplicationGatewayInner withGatewayIPConfigurations(List authenticationCert } /** - * Set the authenticationCertificates value. + * Set authentication certificates of the application gateway resource. * * @param authenticationCertificates the authenticationCertificates value to set * @return the ApplicationGatewayInner object itself. @@ -234,7 +242,7 @@ public ApplicationGatewayInner withAuthenticationCertificates(List sslCertificates() { } /** - * Set the sslCertificates value. + * Set sSL certificates of the application gateway resource. * * @param sslCertificates the sslCertificates value to set * @return the ApplicationGatewayInner object itself. @@ -254,7 +262,7 @@ public ApplicationGatewayInner withSslCertificates(List frontendIPConfigurat } /** - * Set the frontendIPConfigurations value. + * Set frontend IP addresses of the application gateway resource. * * @param frontendIPConfigurations the frontendIPConfigurations value to set * @return the ApplicationGatewayInner object itself. @@ -274,7 +282,7 @@ public ApplicationGatewayInner withFrontendIPConfigurations(List frontendPorts() { } /** - * Set the frontendPorts value. + * Set frontend ports of the application gateway resource. * * @param frontendPorts the frontendPorts value to set * @return the ApplicationGatewayInner object itself. @@ -294,7 +302,7 @@ public ApplicationGatewayInner withFrontendPorts(List probes() { } /** - * Set the probes value. + * Set probes of the application gateway resource. * * @param probes the probes value to set * @return the ApplicationGatewayInner object itself. @@ -314,7 +322,7 @@ public ApplicationGatewayInner withProbes(List pro } /** - * Get the backendAddressPools value. + * Get backend address pool of the application gateway resource. * * @return the backendAddressPools value */ @@ -323,7 +331,7 @@ public List backendAddressPools() { } /** - * Set the backendAddressPools value. + * Set backend address pool of the application gateway resource. * * @param backendAddressPools the backendAddressPools value to set * @return the ApplicationGatewayInner object itself. @@ -334,7 +342,7 @@ public ApplicationGatewayInner withBackendAddressPools(List backendHttpSettingsColle } /** - * Set the backendHttpSettingsCollection value. + * Set backend http settings of the application gateway resource. * * @param backendHttpSettingsCollection the backendHttpSettingsCollection value to set * @return the ApplicationGatewayInner object itself. @@ -354,7 +362,7 @@ public ApplicationGatewayInner withBackendHttpSettingsCollection(List httpListeners() { } /** - * Set the httpListeners value. + * Set http listeners of the application gateway resource. * * @param httpListeners the httpListeners value to set * @return the ApplicationGatewayInner object itself. @@ -374,7 +382,7 @@ public ApplicationGatewayInner withHttpListeners(List urlPathMaps() { } /** - * Set the urlPathMaps value. + * Set uRL path map of the application gateway resource. * * @param urlPathMaps the urlPathMaps value to set * @return the ApplicationGatewayInner object itself. @@ -394,7 +402,7 @@ public ApplicationGatewayInner withUrlPathMaps(List requestRoutingRules() { } /** - * Set the requestRoutingRules value. + * Set request routing rules of the application gateway resource. * * @param requestRoutingRules the requestRoutingRules value to set * @return the ApplicationGatewayInner object itself. @@ -414,7 +422,7 @@ public ApplicationGatewayInner withRequestRoutingRules(List redirectConfigurations } /** - * Set the redirectConfigurations value. + * Set redirect configurations of the application gateway resource. * * @param redirectConfigurations the redirectConfigurations value to set * @return the ApplicationGatewayInner object itself. @@ -434,7 +442,7 @@ public ApplicationGatewayInner withRedirectConfigurations(List zones() { - return this.zones; + public String id() { + return this.id; } /** - * Set the zones value. + * Set resource ID. * - * @param zones the zones value to set + * @param id the id value to set * @return the ApplicationGatewayInner object itself. */ - public ApplicationGatewayInner withZones(List zones) { - this.zones = zones; + public ApplicationGatewayInner withId(String id) { + this.id = id; return this; } + } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationGatewayPathRuleInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationGatewayPathRuleInner.java index 0ca2b6cec50..9283ae8e971 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationGatewayPathRuleInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationGatewayPathRuleInner.java @@ -50,8 +50,7 @@ public class ApplicationGatewayPathRuleInner extends SubResource { private String provisioningState; /** - * Name of the resource that is unique within a resource group. This name - * can be used to access the resource. + * Name of the path rule that is unique within an Application Gateway. */ @JsonProperty(value = "name") private String name; @@ -69,7 +68,7 @@ public class ApplicationGatewayPathRuleInner extends SubResource { private String type; /** - * Get the paths value. + * Get path rules of URL path map. * * @return the paths value */ @@ -78,7 +77,7 @@ public List paths() { } /** - * Set the paths value. + * Set path rules of URL path map. * * @param paths the paths value to set * @return the ApplicationGatewayPathRuleInner object itself. @@ -89,7 +88,7 @@ public ApplicationGatewayPathRuleInner withPaths(List paths) { } /** - * Get the backendAddressPool value. + * Get backend address pool resource of URL path map path rule. * * @return the backendAddressPool value */ @@ -98,7 +97,7 @@ public SubResource backendAddressPool() { } /** - * Set the backendAddressPool value. + * Set backend address pool resource of URL path map path rule. * * @param backendAddressPool the backendAddressPool value to set * @return the ApplicationGatewayPathRuleInner object itself. @@ -109,7 +108,7 @@ public ApplicationGatewayPathRuleInner withBackendAddressPool(SubResource backen } /** - * Get the backendHttpSettings value. + * Get backend http settings resource of URL path map path rule. * * @return the backendHttpSettings value */ @@ -118,7 +117,7 @@ public SubResource backendHttpSettings() { } /** - * Set the backendHttpSettings value. + * Set backend http settings resource of URL path map path rule. * * @param backendHttpSettings the backendHttpSettings value to set * @return the ApplicationGatewayPathRuleInner object itself. @@ -129,7 +128,7 @@ public ApplicationGatewayPathRuleInner withBackendHttpSettings(SubResource backe } /** - * Get the redirectConfiguration value. + * Get redirect configuration resource of URL path map path rule. * * @return the redirectConfiguration value */ @@ -138,7 +137,7 @@ public SubResource redirectConfiguration() { } /** - * Set the redirectConfiguration value. + * Set redirect configuration resource of URL path map path rule. * * @param redirectConfiguration the redirectConfiguration value to set * @return the ApplicationGatewayPathRuleInner object itself. @@ -149,7 +148,7 @@ public ApplicationGatewayPathRuleInner withRedirectConfiguration(SubResource red } /** - * Get the provisioningState value. + * Get path rule of URL path map resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. * * @return the provisioningState value */ @@ -158,7 +157,7 @@ public String provisioningState() { } /** - * Set the provisioningState value. + * Set path rule of URL path map resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. * * @param provisioningState the provisioningState value to set * @return the ApplicationGatewayPathRuleInner object itself. @@ -169,7 +168,7 @@ public ApplicationGatewayPathRuleInner withProvisioningState(String provisioning } /** - * Get the name value. + * Get name of the path rule that is unique within an Application Gateway. * * @return the name value */ @@ -178,7 +177,7 @@ public String name() { } /** - * Set the name value. + * Set name of the path rule that is unique within an Application Gateway. * * @param name the name value to set * @return the ApplicationGatewayPathRuleInner object itself. @@ -189,7 +188,7 @@ public ApplicationGatewayPathRuleInner withName(String name) { } /** - * Get the etag value. + * Get a unique read-only string that changes whenever the resource is updated. * * @return the etag value */ @@ -198,7 +197,7 @@ public String etag() { } /** - * Set the etag value. + * Set a unique read-only string that changes whenever the resource is updated. * * @param etag the etag value to set * @return the ApplicationGatewayPathRuleInner object itself. @@ -209,7 +208,7 @@ public ApplicationGatewayPathRuleInner withEtag(String etag) { } /** - * Get the type value. + * Get type of the resource. * * @return the type value */ @@ -218,7 +217,7 @@ public String type() { } /** - * Set the type value. + * Set type of the resource. * * @param type the type value to set * @return the ApplicationGatewayPathRuleInner object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationGatewayProbeInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationGatewayProbeInner.java index b78652804db..4a47fcc5453 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationGatewayProbeInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationGatewayProbeInner.java @@ -20,7 +20,8 @@ @JsonFlatten public class ApplicationGatewayProbeInner extends SubResource { /** - * Protocol. Possible values include: 'Http', 'Https'. + * The protocol used for the probe. Possible values are 'Http' and 'Https'. + * Possible values include: 'Http', 'Https'. */ @JsonProperty(value = "properties.protocol") private ApplicationGatewayProtocol protocol; @@ -90,8 +91,7 @@ public class ApplicationGatewayProbeInner extends SubResource { private String provisioningState; /** - * Name of the resource that is unique within a resource group. This name - * can be used to access the resource. + * Name of the probe that is unique within an Application Gateway. */ @JsonProperty(value = "name") private String name; @@ -109,7 +109,7 @@ public class ApplicationGatewayProbeInner extends SubResource { private String type; /** - * Get the protocol value. + * Get the protocol used for the probe. Possible values are 'Http' and 'Https'. Possible values include: 'Http', 'Https'. * * @return the protocol value */ @@ -118,7 +118,7 @@ public ApplicationGatewayProtocol protocol() { } /** - * Set the protocol value. + * Set the protocol used for the probe. Possible values are 'Http' and 'Https'. Possible values include: 'Http', 'Https'. * * @param protocol the protocol value to set * @return the ApplicationGatewayProbeInner object itself. @@ -129,7 +129,7 @@ public ApplicationGatewayProbeInner withProtocol(ApplicationGatewayProtocol prot } /** - * Get the host value. + * Get host name to send the probe to. * * @return the host value */ @@ -138,7 +138,7 @@ public String host() { } /** - * Set the host value. + * Set host name to send the probe to. * * @param host the host value to set * @return the ApplicationGatewayProbeInner object itself. @@ -149,7 +149,7 @@ public ApplicationGatewayProbeInner withHost(String host) { } /** - * Get the path value. + * Get relative path of probe. Valid path starts from '/'. Probe is sent to <Protocol>://<host>:<port><path>. * * @return the path value */ @@ -158,7 +158,7 @@ public String path() { } /** - * Set the path value. + * Set relative path of probe. Valid path starts from '/'. Probe is sent to <Protocol>://<host>:<port><path>. * * @param path the path value to set * @return the ApplicationGatewayProbeInner object itself. @@ -169,7 +169,7 @@ public ApplicationGatewayProbeInner withPath(String path) { } /** - * Get the interval value. + * Get the probing interval in seconds. This is the time interval between two consecutive probes. Acceptable values are from 1 second to 86400 seconds. * * @return the interval value */ @@ -178,7 +178,7 @@ public Integer interval() { } /** - * Set the interval value. + * Set the probing interval in seconds. This is the time interval between two consecutive probes. Acceptable values are from 1 second to 86400 seconds. * * @param interval the interval value to set * @return the ApplicationGatewayProbeInner object itself. @@ -189,7 +189,7 @@ public ApplicationGatewayProbeInner withInterval(Integer interval) { } /** - * Get the timeout value. + * Get the probe timeout in seconds. Probe marked as failed if valid response is not received with this timeout period. Acceptable values are from 1 second to 86400 seconds. * * @return the timeout value */ @@ -198,7 +198,7 @@ public Integer timeout() { } /** - * Set the timeout value. + * Set the probe timeout in seconds. Probe marked as failed if valid response is not received with this timeout period. Acceptable values are from 1 second to 86400 seconds. * * @param timeout the timeout value to set * @return the ApplicationGatewayProbeInner object itself. @@ -209,7 +209,7 @@ public ApplicationGatewayProbeInner withTimeout(Integer timeout) { } /** - * Get the unhealthyThreshold value. + * Get the probe retry count. Backend server is marked down after consecutive probe failure count reaches UnhealthyThreshold. Acceptable values are from 1 second to 20. * * @return the unhealthyThreshold value */ @@ -218,7 +218,7 @@ public Integer unhealthyThreshold() { } /** - * Set the unhealthyThreshold value. + * Set the probe retry count. Backend server is marked down after consecutive probe failure count reaches UnhealthyThreshold. Acceptable values are from 1 second to 20. * * @param unhealthyThreshold the unhealthyThreshold value to set * @return the ApplicationGatewayProbeInner object itself. @@ -229,7 +229,7 @@ public ApplicationGatewayProbeInner withUnhealthyThreshold(Integer unhealthyThre } /** - * Get the pickHostNameFromBackendHttpSettings value. + * Get whether the host header should be picked from the backend http settings. Default value is false. * * @return the pickHostNameFromBackendHttpSettings value */ @@ -238,7 +238,7 @@ public Boolean pickHostNameFromBackendHttpSettings() { } /** - * Set the pickHostNameFromBackendHttpSettings value. + * Set whether the host header should be picked from the backend http settings. Default value is false. * * @param pickHostNameFromBackendHttpSettings the pickHostNameFromBackendHttpSettings value to set * @return the ApplicationGatewayProbeInner object itself. @@ -249,7 +249,7 @@ public ApplicationGatewayProbeInner withPickHostNameFromBackendHttpSettings(Bool } /** - * Get the minServers value. + * Get minimum number of servers that are always marked healthy. Default value is 0. * * @return the minServers value */ @@ -258,7 +258,7 @@ public Integer minServers() { } /** - * Set the minServers value. + * Set minimum number of servers that are always marked healthy. Default value is 0. * * @param minServers the minServers value to set * @return the ApplicationGatewayProbeInner object itself. @@ -269,7 +269,7 @@ public ApplicationGatewayProbeInner withMinServers(Integer minServers) { } /** - * Get the match value. + * Get criterion for classifying a healthy probe response. * * @return the match value */ @@ -278,7 +278,7 @@ public ApplicationGatewayProbeHealthResponseMatch match() { } /** - * Set the match value. + * Set criterion for classifying a healthy probe response. * * @param match the match value to set * @return the ApplicationGatewayProbeInner object itself. @@ -289,7 +289,7 @@ public ApplicationGatewayProbeInner withMatch(ApplicationGatewayProbeHealthRespo } /** - * Get the provisioningState value. + * Get provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. * * @return the provisioningState value */ @@ -298,7 +298,7 @@ public String provisioningState() { } /** - * Set the provisioningState value. + * Set provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. * * @param provisioningState the provisioningState value to set * @return the ApplicationGatewayProbeInner object itself. @@ -309,7 +309,7 @@ public ApplicationGatewayProbeInner withProvisioningState(String provisioningSta } /** - * Get the name value. + * Get name of the probe that is unique within an Application Gateway. * * @return the name value */ @@ -318,7 +318,7 @@ public String name() { } /** - * Set the name value. + * Set name of the probe that is unique within an Application Gateway. * * @param name the name value to set * @return the ApplicationGatewayProbeInner object itself. @@ -329,7 +329,7 @@ public ApplicationGatewayProbeInner withName(String name) { } /** - * Get the etag value. + * Get a unique read-only string that changes whenever the resource is updated. * * @return the etag value */ @@ -338,7 +338,7 @@ public String etag() { } /** - * Set the etag value. + * Set a unique read-only string that changes whenever the resource is updated. * * @param etag the etag value to set * @return the ApplicationGatewayProbeInner object itself. @@ -349,7 +349,7 @@ public ApplicationGatewayProbeInner withEtag(String etag) { } /** - * Get the type value. + * Get type of the resource. * * @return the type value */ @@ -358,7 +358,7 @@ public String type() { } /** - * Set the type value. + * Set type of the resource. * * @param type the type value to set * @return the ApplicationGatewayProbeInner object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationGatewayRedirectConfigurationInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationGatewayRedirectConfigurationInner.java index f85fd06bf40..d03f7602526 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationGatewayRedirectConfigurationInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationGatewayRedirectConfigurationInner.java @@ -70,8 +70,8 @@ public class ApplicationGatewayRedirectConfigurationInner extends SubResource { private List pathRules; /** - * Name of the resource that is unique within a resource group. This name - * can be used to access the resource. + * Name of the redirect configuration that is unique within an Application + * Gateway. */ @JsonProperty(value = "name") private String name; @@ -89,7 +89,7 @@ public class ApplicationGatewayRedirectConfigurationInner extends SubResource { private String type; /** - * Get the redirectType value. + * Get supported http redirection types - Permanent, Temporary, Found, SeeOther. Possible values include: 'Permanent', 'Found', 'SeeOther', 'Temporary'. * * @return the redirectType value */ @@ -98,7 +98,7 @@ public ApplicationGatewayRedirectType redirectType() { } /** - * Set the redirectType value. + * Set supported http redirection types - Permanent, Temporary, Found, SeeOther. Possible values include: 'Permanent', 'Found', 'SeeOther', 'Temporary'. * * @param redirectType the redirectType value to set * @return the ApplicationGatewayRedirectConfigurationInner object itself. @@ -109,7 +109,7 @@ public ApplicationGatewayRedirectConfigurationInner withRedirectType(Application } /** - * Get the targetListener value. + * Get reference to a listener to redirect the request to. * * @return the targetListener value */ @@ -118,7 +118,7 @@ public SubResource targetListener() { } /** - * Set the targetListener value. + * Set reference to a listener to redirect the request to. * * @param targetListener the targetListener value to set * @return the ApplicationGatewayRedirectConfigurationInner object itself. @@ -129,7 +129,7 @@ public ApplicationGatewayRedirectConfigurationInner withTargetListener(SubResour } /** - * Get the targetUrl value. + * Get url to redirect the request to. * * @return the targetUrl value */ @@ -138,7 +138,7 @@ public String targetUrl() { } /** - * Set the targetUrl value. + * Set url to redirect the request to. * * @param targetUrl the targetUrl value to set * @return the ApplicationGatewayRedirectConfigurationInner object itself. @@ -149,7 +149,7 @@ public ApplicationGatewayRedirectConfigurationInner withTargetUrl(String targetU } /** - * Get the includePath value. + * Get include path in the redirected url. * * @return the includePath value */ @@ -158,7 +158,7 @@ public Boolean includePath() { } /** - * Set the includePath value. + * Set include path in the redirected url. * * @param includePath the includePath value to set * @return the ApplicationGatewayRedirectConfigurationInner object itself. @@ -169,7 +169,7 @@ public ApplicationGatewayRedirectConfigurationInner withIncludePath(Boolean incl } /** - * Get the includeQueryString value. + * Get include query string in the redirected url. * * @return the includeQueryString value */ @@ -178,7 +178,7 @@ public Boolean includeQueryString() { } /** - * Set the includeQueryString value. + * Set include query string in the redirected url. * * @param includeQueryString the includeQueryString value to set * @return the ApplicationGatewayRedirectConfigurationInner object itself. @@ -189,7 +189,7 @@ public ApplicationGatewayRedirectConfigurationInner withIncludeQueryString(Boole } /** - * Get the requestRoutingRules value. + * Get request routing specifying redirect configuration. * * @return the requestRoutingRules value */ @@ -198,7 +198,7 @@ public List requestRoutingRules() { } /** - * Set the requestRoutingRules value. + * Set request routing specifying redirect configuration. * * @param requestRoutingRules the requestRoutingRules value to set * @return the ApplicationGatewayRedirectConfigurationInner object itself. @@ -209,7 +209,7 @@ public ApplicationGatewayRedirectConfigurationInner withRequestRoutingRules(List } /** - * Get the urlPathMaps value. + * Get url path maps specifying default redirect configuration. * * @return the urlPathMaps value */ @@ -218,7 +218,7 @@ public List urlPathMaps() { } /** - * Set the urlPathMaps value. + * Set url path maps specifying default redirect configuration. * * @param urlPathMaps the urlPathMaps value to set * @return the ApplicationGatewayRedirectConfigurationInner object itself. @@ -229,7 +229,7 @@ public ApplicationGatewayRedirectConfigurationInner withUrlPathMaps(List pathRules() { } /** - * Set the pathRules value. + * Set path rules specifying redirect configuration. * * @param pathRules the pathRules value to set * @return the ApplicationGatewayRedirectConfigurationInner object itself. @@ -249,7 +249,7 @@ public ApplicationGatewayRedirectConfigurationInner withPathRules(List cipherSuites() { } /** - * Set the cipherSuites value. + * Set ssl cipher suites to be enabled in the specified order for application gateway. * * @param cipherSuites the cipherSuites value to set * @return the ApplicationGatewaySslPredefinedPolicyInner object itself. @@ -81,7 +81,7 @@ public ApplicationGatewaySslPredefinedPolicyInner withCipherSuites(List pathRules() { } /** - * Set the pathRules value. + * Set path rule of URL path map resource. * * @param pathRules the pathRules value to set * @return the ApplicationGatewayUrlPathMapInner object itself. @@ -150,7 +149,7 @@ public ApplicationGatewayUrlPathMapInner withPathRules(List, InnerSupportsDelete, InnerSupportsListing { +public class ApplicationGatewaysInner implements InnerSupportsGet, InnerSupportsDelete { /** The Retrofit service to perform REST calls. */ private ApplicationGatewaysService service; /** The service client containing this operation class. */ @@ -85,13 +87,21 @@ interface ApplicationGatewaysService { @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}") Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("applicationGatewayName") String applicationGatewayName, @Path("subscriptionId") String subscriptionId, @Body ApplicationGatewayInner 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.network.ApplicationGateways updateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}") + Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("applicationGatewayName") String applicationGatewayName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.ApplicationGateways beginUpdateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}") + Observable> beginUpdateTags(@Path("resourceGroupName") String resourceGroupName, @Path("applicationGatewayName") String applicationGatewayName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.ApplicationGateways listByResourceGroup" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways") Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @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.network.ApplicationGateways list" }) + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.ApplicationGateways listAll" }) @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGateways") - Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listAll(@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.network.ApplicationGateways start" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/start") @@ -137,9 +147,9 @@ interface ApplicationGatewaysService { @GET Observable> listByResourceGroupNext(@Url String nextUrl, @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.network.ApplicationGateways listNext" }) + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.ApplicationGateways listAllNext" }) @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listAllNext(@Url String nextUrl, @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.network.ApplicationGateways listAvailableSslPredefinedPoliciesNext" }) @GET @@ -208,7 +218,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.delete(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -274,7 +284,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -291,9 +301,9 @@ public Observable> call(Response response) { private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) - .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -360,7 +370,7 @@ public Observable> getByResourceGroupWi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.getByResourceGroup(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -452,7 +462,7 @@ public Observable> createOrUpdateWithSe throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.createOrUpdate(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -527,7 +537,7 @@ public Observable> beginCreateOrUpdateW throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -544,7 +554,321 @@ public Observable> call(Response beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates the specified application gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ApplicationGatewayInner object if successful. + */ + public ApplicationGatewayInner updateTags(String resourceGroupName, String applicationGatewayName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, applicationGatewayName).toBlocking().last().body(); + } + + /** + * Updates the specified application gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateTagsAsync(String resourceGroupName, String applicationGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, applicationGatewayName), serviceCallback); + } + + /** + * Updates the specified application gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateTagsAsync(String resourceGroupName, String applicationGatewayName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, applicationGatewayName).map(new Func1, ApplicationGatewayInner>() { + @Override + public ApplicationGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the specified application gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String applicationGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (applicationGatewayName == null) { + throw new IllegalArgumentException("Parameter applicationGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + Observable> observable = service.updateTags(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Updates the specified application gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ApplicationGatewayInner object if successful. + */ + public ApplicationGatewayInner updateTags(String resourceGroupName, String applicationGatewayName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, applicationGatewayName, tags).toBlocking().last().body(); + } + + /** + * Updates the specified application gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @param tags Resource tags. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateTagsAsync(String resourceGroupName, String applicationGatewayName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, applicationGatewayName, tags), serviceCallback); + } + + /** + * Updates the specified application gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateTagsAsync(String resourceGroupName, String applicationGatewayName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, applicationGatewayName, tags).map(new Func1, ApplicationGatewayInner>() { + @Override + public ApplicationGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the specified application gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String applicationGatewayName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (applicationGatewayName == null) { + throw new IllegalArgumentException("Parameter applicationGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + Observable> observable = service.updateTags(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Updates the specified application gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ApplicationGatewayInner object if successful. + */ + public ApplicationGatewayInner beginUpdateTags(String resourceGroupName, String applicationGatewayName) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, applicationGatewayName).toBlocking().single().body(); + } + + /** + * Updates the specified application gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateTagsAsync(String resourceGroupName, String applicationGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, applicationGatewayName), serviceCallback); + } + + /** + * Updates the specified application gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationGatewayInner object + */ + public Observable beginUpdateTagsAsync(String resourceGroupName, String applicationGatewayName) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, applicationGatewayName).map(new Func1, ApplicationGatewayInner>() { + @Override + public ApplicationGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the specified application gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationGatewayInner object + */ + public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String applicationGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (applicationGatewayName == null) { + throw new IllegalArgumentException("Parameter applicationGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.beginUpdateTags(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates the specified application gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ApplicationGatewayInner object if successful. + */ + public ApplicationGatewayInner beginUpdateTags(String resourceGroupName, String applicationGatewayName, Map tags) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, applicationGatewayName, tags).toBlocking().single().body(); + } + + /** + * Updates the specified application gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @param tags Resource tags. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateTagsAsync(String resourceGroupName, String applicationGatewayName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, applicationGatewayName, tags), serviceCallback); + } + + /** + * Updates the specified application gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationGatewayInner object + */ + public Observable beginUpdateTagsAsync(String resourceGroupName, String applicationGatewayName, Map tags) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, applicationGatewayName, tags).map(new Func1, ApplicationGatewayInner>() { + @Override + public ApplicationGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the specified application gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param applicationGatewayName The name of the application gateway. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationGatewayInner object + */ + public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String applicationGatewayName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (applicationGatewayName == null) { + throw new IllegalArgumentException("Parameter applicationGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.beginUpdateTags(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateTagsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -641,7 +965,7 @@ public Observable>> listByResource if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -671,12 +995,12 @@ private ServiceResponse> listByResourceGroupDe * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList<ApplicationGatewayInner> object if successful. */ - public PagedList list() { - ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + public PagedList listAll() { + ServiceResponse> response = listAllSinglePageAsync().toBlocking().single(); return new PagedList(response.body()) { @Override public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + return listAllNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; } @@ -688,13 +1012,13 @@ public Page nextPage(String nextPageLink) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { + public ServiceFuture> listAllAsync(final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(), + listAllSinglePageAsync(), new Func1>>>() { @Override public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); + return listAllNextSinglePageAsync(nextPageLink); } }, serviceCallback); @@ -706,8 +1030,8 @@ public Observable>> call(String ne * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<ApplicationGatewayInner> object */ - public Observable> listAsync() { - return listWithServiceResponseAsync() + public Observable> listAllAsync() { + return listAllWithServiceResponseAsync() .map(new Func1>, Page>() { @Override public Page call(ServiceResponse> response) { @@ -722,8 +1046,8 @@ public Page call(ServiceResponse>> listWithServiceResponseAsync() { - return listSinglePageAsync() + public Observable>> listAllWithServiceResponseAsync() { + return listAllSinglePageAsync() .concatMap(new Func1>, Observable>>>() { @Override public Observable>> call(ServiceResponse> page) { @@ -731,7 +1055,7 @@ public Observable>> call(ServiceRe if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listAllNextWithServiceResponseAsync(nextPageLink)); } }); } @@ -742,17 +1066,17 @@ public Observable>> call(ServiceRe * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList<ApplicationGatewayInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> listSinglePageAsync() { + public Observable>> listAllSinglePageAsync() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; - return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2018-04-01"; + return service.listAll(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { - ServiceResponse> result = listDelegate(response); + ServiceResponse> result = listAllDelegate(response); return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); @@ -761,7 +1085,7 @@ public Observable>> call(Response< }); } - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse> listAllDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) @@ -829,7 +1153,7 @@ public Observable> startWithServiceResponseAsync(String re if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.start(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -895,7 +1219,7 @@ public Observable> beginStartWithServiceResponseAsync(Stri if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginStart(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -979,7 +1303,7 @@ public Observable> stopWithServiceResponseAsync(String res if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.stop(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -1045,7 +1369,7 @@ public Observable> beginStopWithServiceResponseAsync(Strin if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginStop(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1130,7 +1454,7 @@ public Observable> backend if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; final String expand = null; Observable> observable = service.backendHealth(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); @@ -1201,7 +1525,7 @@ public Observable> backend if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.backendHealth(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -1268,7 +1592,7 @@ public Observable> beginBa if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; final String expand = null; return service.beginBackendHealth(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -1350,7 +1674,7 @@ public Observable> beginBa if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginBackendHealth(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1421,7 +1745,7 @@ public Observable, Observable>>() { @Override @@ -1491,7 +1815,7 @@ public Observable> l if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.listAvailableSslOptions(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1596,7 +1920,7 @@ public Observable, Observable>>>() { @Override @@ -1673,7 +1997,7 @@ public Observable> g if (predefinedPolicyName == null) { throw new IllegalArgumentException("Parameter predefinedPolicyName is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.getSslPredefinedPolicy(this.client.subscriptionId(), predefinedPolicyName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1815,12 +2139,12 @@ private ServiceResponse> listByResourceGroupNe * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList<ApplicationGatewayInner> object if successful. */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + public PagedList listAllNext(final String nextPageLink) { + ServiceResponse> response = listAllNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.body()) { @Override public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + return listAllNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; } @@ -1834,13 +2158,13 @@ public Page nextPage(String nextPageLink) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + public ServiceFuture> listAllNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), + listAllNextSinglePageAsync(nextPageLink), new Func1>>>() { @Override public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); + return listAllNextSinglePageAsync(nextPageLink); } }, serviceCallback); @@ -1853,8 +2177,8 @@ public Observable>> call(String ne * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<ApplicationGatewayInner> object */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) + public Observable> listAllNextAsync(final String nextPageLink) { + return listAllNextWithServiceResponseAsync(nextPageLink) .map(new Func1>, Page>() { @Override public Page call(ServiceResponse> response) { @@ -1870,8 +2194,8 @@ public Page call(ServiceResponse>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) + public Observable>> listAllNextWithServiceResponseAsync(final String nextPageLink) { + return listAllNextSinglePageAsync(nextPageLink) .concatMap(new Func1>, Observable>>>() { @Override public Observable>> call(ServiceResponse> page) { @@ -1879,7 +2203,7 @@ public Observable>> call(ServiceRe if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listAllNextWithServiceResponseAsync(nextPageLink)); } }); } @@ -1891,17 +2215,17 @@ public Observable>> call(ServiceRe * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList<ApplicationGatewayInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { + public Observable>> listAllNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + return service.listAllNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { - ServiceResponse> result = listNextDelegate(response); + ServiceResponse> result = listAllNextDelegate(response); return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); @@ -1910,7 +2234,7 @@ public Observable>> call(Response< }); } - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse> listAllNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationSecurityGroupInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationSecurityGroupInner.java new file mode 100644 index 00000000000..06b5d822040 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationSecurityGroupInner.java @@ -0,0 +1,96 @@ +/** + * 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.network.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * An application security group in a resource group. + */ +@JsonFlatten +@SkipParentValidation +public class ApplicationSecurityGroupInner extends Resource { + /** + * The resource GUID property of the application security group resource. + * It uniquely identifies a resource, even if the user changes its name or + * migrate the resource across subscriptions or resource groups. + */ + @JsonProperty(value = "properties.resourceGuid", access = JsonProperty.Access.WRITE_ONLY) + private String resourceGuid; + + /** + * The provisioning state of the application security group resource. + * Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get the resource GUID property of the application security group resource. It uniquely identifies a resource, even if the user changes its name or migrate the resource across subscriptions or resource groups. + * + * @return the resourceGuid value + */ + public String resourceGuid() { + return this.resourceGuid; + } + + /** + * Get the provisioning state of the application security group resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'. + * + * @return the provisioningState value + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the ApplicationSecurityGroupInner object itself. + */ + public ApplicationSecurityGroupInner withId(String id) { + this.id = id; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationSecurityGroupsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationSecurityGroupsInner.java new file mode 100644 index 00000000000..54944074465 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationSecurityGroupsInner.java @@ -0,0 +1,948 @@ +/** + * 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.network.implementation; + +import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet; +import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete; +import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsListing; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in ApplicationSecurityGroups. + */ +public class ApplicationSecurityGroupsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private ApplicationSecurityGroupsService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of ApplicationSecurityGroupsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ApplicationSecurityGroupsInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(ApplicationSecurityGroupsService.class); + this.client = client; + } + + /** + * The interface defining all the services for ApplicationSecurityGroups to be + * used by Retrofit to perform actually REST calls. + */ + interface ApplicationSecurityGroupsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.ApplicationSecurityGroups delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("applicationSecurityGroupName") String applicationSecurityGroupName, @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.network.ApplicationSecurityGroups beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("applicationSecurityGroupName") String applicationSecurityGroupName, @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.network.ApplicationSecurityGroups getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}") + Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("applicationSecurityGroupName") String applicationSecurityGroupName, @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.network.ApplicationSecurityGroups createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("applicationSecurityGroupName") String applicationSecurityGroupName, @Path("subscriptionId") String subscriptionId, @Body ApplicationSecurityGroupInner 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.network.ApplicationSecurityGroups beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("applicationSecurityGroupName") String applicationSecurityGroupName, @Path("subscriptionId") String subscriptionId, @Body ApplicationSecurityGroupInner 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.network.ApplicationSecurityGroups list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationSecurityGroups") + Observable> list(@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.network.ApplicationSecurityGroups listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @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.network.ApplicationSecurityGroups listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @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.network.ApplicationSecurityGroups listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Deletes the specified application security group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationSecurityGroupName The name of the application security group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String applicationSecurityGroupName) { + deleteWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName).toBlocking().last().body(); + } + + /** + * Deletes the specified application security group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationSecurityGroupName The name of the application security group. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String applicationSecurityGroupName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName), serviceCallback); + } + + /** + * Deletes the specified application security group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationSecurityGroupName The name of the application security group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String applicationSecurityGroupName) { + return deleteWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified application security group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationSecurityGroupName The name of the application security group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String applicationSecurityGroupName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (applicationSecurityGroupName == null) { + throw new IllegalArgumentException("Parameter applicationSecurityGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + Observable> observable = service.delete(resourceGroupName, applicationSecurityGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified application security group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationSecurityGroupName The name of the application security group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginDelete(String resourceGroupName, String applicationSecurityGroupName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName).toBlocking().single().body(); + } + + /** + * Deletes the specified application security group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationSecurityGroupName The name of the application security group. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDeleteAsync(String resourceGroupName, String applicationSecurityGroupName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName), serviceCallback); + } + + /** + * Deletes the specified application security group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationSecurityGroupName The name of the application security group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String applicationSecurityGroupName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified application security group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationSecurityGroupName The name of the application security group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String applicationSecurityGroupName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (applicationSecurityGroupName == null) { + throw new IllegalArgumentException("Parameter applicationSecurityGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + return service.beginDelete(resourceGroupName, applicationSecurityGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets information about the specified application security group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationSecurityGroupName The name of the application security group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ApplicationSecurityGroupInner object if successful. + */ + public ApplicationSecurityGroupInner getByResourceGroup(String resourceGroupName, String applicationSecurityGroupName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName).toBlocking().single().body(); + } + + /** + * Gets information about the specified application security group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationSecurityGroupName The name of the application security group. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String applicationSecurityGroupName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName), serviceCallback); + } + + /** + * Gets information about the specified application security group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationSecurityGroupName The name of the application security group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationSecurityGroupInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String applicationSecurityGroupName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName).map(new Func1, ApplicationSecurityGroupInner>() { + @Override + public ApplicationSecurityGroupInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets information about the specified application security group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationSecurityGroupName The name of the application security group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationSecurityGroupInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String applicationSecurityGroupName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (applicationSecurityGroupName == null) { + throw new IllegalArgumentException("Parameter applicationSecurityGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + return service.getByResourceGroup(resourceGroupName, applicationSecurityGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates or updates an application security group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationSecurityGroupName The name of the application security group. + * @param parameters Parameters supplied to the create or update ApplicationSecurityGroup operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ApplicationSecurityGroupInner object if successful. + */ + public ApplicationSecurityGroupInner createOrUpdate(String resourceGroupName, String applicationSecurityGroupName, ApplicationSecurityGroupInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName, parameters).toBlocking().last().body(); + } + + /** + * Creates or updates an application security group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationSecurityGroupName The name of the application security group. + * @param parameters Parameters supplied to the create or update ApplicationSecurityGroup operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String applicationSecurityGroupName, ApplicationSecurityGroupInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName, parameters), serviceCallback); + } + + /** + * Creates or updates an application security group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationSecurityGroupName The name of the application security group. + * @param parameters Parameters supplied to the create or update ApplicationSecurityGroup operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String applicationSecurityGroupName, ApplicationSecurityGroupInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName, parameters).map(new Func1, ApplicationSecurityGroupInner>() { + @Override + public ApplicationSecurityGroupInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates an application security group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationSecurityGroupName The name of the application security group. + * @param parameters Parameters supplied to the create or update ApplicationSecurityGroup operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String applicationSecurityGroupName, ApplicationSecurityGroupInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (applicationSecurityGroupName == null) { + throw new IllegalArgumentException("Parameter applicationSecurityGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2018-04-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, applicationSecurityGroupName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates an application security group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationSecurityGroupName The name of the application security group. + * @param parameters Parameters supplied to the create or update ApplicationSecurityGroup operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ApplicationSecurityGroupInner object if successful. + */ + public ApplicationSecurityGroupInner beginCreateOrUpdate(String resourceGroupName, String applicationSecurityGroupName, ApplicationSecurityGroupInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates an application security group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationSecurityGroupName The name of the application security group. + * @param parameters Parameters supplied to the create or update ApplicationSecurityGroup operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String applicationSecurityGroupName, ApplicationSecurityGroupInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName, parameters), serviceCallback); + } + + /** + * Creates or updates an application security group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationSecurityGroupName The name of the application security group. + * @param parameters Parameters supplied to the create or update ApplicationSecurityGroup operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationSecurityGroupInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String applicationSecurityGroupName, ApplicationSecurityGroupInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName, parameters).map(new Func1, ApplicationSecurityGroupInner>() { + @Override + public ApplicationSecurityGroupInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates an application security group. + * + * @param resourceGroupName The name of the resource group. + * @param applicationSecurityGroupName The name of the application security group. + * @param parameters Parameters supplied to the create or update ApplicationSecurityGroup operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationSecurityGroupInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String applicationSecurityGroupName, ApplicationSecurityGroupInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (applicationSecurityGroupName == null) { + throw new IllegalArgumentException("Parameter applicationSecurityGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2018-04-01"; + return service.beginCreateOrUpdate(resourceGroupName, applicationSecurityGroupName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets all application security groups in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ApplicationSecurityGroupInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all application security groups in a subscription. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all application security groups in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ApplicationSecurityGroupInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all application security groups in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ApplicationSecurityGroupInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all application security groups in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ApplicationSecurityGroupInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets all the application security groups in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ApplicationSecurityGroupInner> object if successful. + */ + public PagedList listByResourceGroup(final String resourceGroupName) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all the application security groups in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(resourceGroupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all the application security groups in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ApplicationSecurityGroupInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the application security groups in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ApplicationSecurityGroupInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { + return listByResourceGroupSinglePageAsync(resourceGroupName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all the application security groups in a resource group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ApplicationSecurityGroupInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets all application security groups in a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ApplicationSecurityGroupInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all application security groups in a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all application security groups in a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ApplicationSecurityGroupInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all application security groups in a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ApplicationSecurityGroupInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all application security groups in a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ApplicationSecurityGroupInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets all the application security groups in a resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ApplicationSecurityGroupInner> object if successful. + */ + public PagedList listByResourceGroupNext(final String nextPageLink) { + ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all the application security groups in a resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all the application security groups in a resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ApplicationSecurityGroupInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the application security groups in a resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ApplicationSecurityGroupInner> object + */ + public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all the application security groups in a resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ApplicationSecurityGroupInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/AvailableEndpointServicesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/AvailableEndpointServicesInner.java new file mode 100644 index 00000000000..4cdc5368f72 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/AvailableEndpointServicesInner.java @@ -0,0 +1,293 @@ +/** + * 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.network.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in AvailableEndpointServices. + */ +public class AvailableEndpointServicesInner { + /** The Retrofit service to perform REST calls. */ + private AvailableEndpointServicesService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of AvailableEndpointServicesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public AvailableEndpointServicesInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(AvailableEndpointServicesService.class); + this.client = client; + } + + /** + * The interface defining all the services for AvailableEndpointServices to be + * used by Retrofit to perform actually REST calls. + */ + interface AvailableEndpointServicesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.AvailableEndpointServices list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/virtualNetworkAvailableEndpointServices") + Observable> list(@Path("location") String location, @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.network.AvailableEndpointServices listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * List what values of endpoint services are available for use. + * + * @param location The location to check available endpoint services. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<EndpointServiceResultInner> object if successful. + */ + public PagedList list(final String location) { + ServiceResponse> response = listSinglePageAsync(location).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List what values of endpoint services are available for use. + * + * @param location The location to check available endpoint services. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final String location, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(location), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List what values of endpoint services are available for use. + * + * @param location The location to check available endpoint services. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EndpointServiceResultInner> object + */ + public Observable> listAsync(final String location) { + return listWithServiceResponseAsync(location) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List what values of endpoint services are available for use. + * + * @param location The location to check available endpoint services. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EndpointServiceResultInner> object + */ + public Observable>> listWithServiceResponseAsync(final String location) { + return listSinglePageAsync(location) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List what values of endpoint services are available for use. + * + ServiceResponse> * @param location The location to check available endpoint services. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<EndpointServiceResultInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String location) { + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + return service.list(location, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List what values of endpoint services are available for use. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<EndpointServiceResultInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List what values of endpoint services are available for use. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List what values of endpoint services are available for use. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EndpointServiceResultInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List what values of endpoint services are available for use. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<EndpointServiceResultInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List what values of endpoint services are available for use. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<EndpointServiceResultInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/AvailableProvidersListInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/AvailableProvidersListInner.java new file mode 100644 index 00000000000..338c80d150a --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/AvailableProvidersListInner.java @@ -0,0 +1,45 @@ +/** + * 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.network.implementation; + +import java.util.List; +import com.microsoft.azure.management.network.AvailableProvidersListCountry; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * List of available countries with details. + */ +public class AvailableProvidersListInner { + /** + * List of available countries. + */ + @JsonProperty(value = "countries", required = true) + private List countries; + + /** + * Get list of available countries. + * + * @return the countries value + */ + public List countries() { + return this.countries; + } + + /** + * Set list of available countries. + * + * @param countries the countries value to set + * @return the AvailableProvidersListInner object itself. + */ + public AvailableProvidersListInner withCountries(List countries) { + this.countries = countries; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/AvailableProvidersListParametersInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/AvailableProvidersListParametersInner.java new file mode 100644 index 00000000000..fd4bebfa759 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/AvailableProvidersListParametersInner.java @@ -0,0 +1,122 @@ +/** + * 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.network.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Constraints that determine the list of available Internet service providers. + */ +public class AvailableProvidersListParametersInner { + /** + * A list of Azure regions. + */ + @JsonProperty(value = "azureLocations") + private List azureLocations; + + /** + * The country for available providers list. + */ + @JsonProperty(value = "country") + private String country; + + /** + * The state for available providers list. + */ + @JsonProperty(value = "state") + private String state; + + /** + * The city or town for available providers list. + */ + @JsonProperty(value = "city") + private String city; + + /** + * Get the azureLocations value. + * + * @return the azureLocations value + */ + public List azureLocations() { + return this.azureLocations; + } + + /** + * Set the azureLocations value. + * + * @param azureLocations the azureLocations value to set + * @return the AvailableProvidersListParametersInner object itself. + */ + public AvailableProvidersListParametersInner withAzureLocations(List azureLocations) { + this.azureLocations = azureLocations; + return this; + } + + /** + * Get the country value. + * + * @return the country value + */ + public String country() { + return this.country; + } + + /** + * Set the country value. + * + * @param country the country value to set + * @return the AvailableProvidersListParametersInner object itself. + */ + public AvailableProvidersListParametersInner withCountry(String country) { + this.country = country; + return this; + } + + /** + * Get the state value. + * + * @return the state value + */ + public String state() { + return this.state; + } + + /** + * Set the state value. + * + * @param state the state value to set + * @return the AvailableProvidersListParametersInner object itself. + */ + public AvailableProvidersListParametersInner withState(String state) { + this.state = state; + return this; + } + + /** + * Get the city value. + * + * @return the city value + */ + public String city() { + return this.city; + } + + /** + * Set the city value. + * + * @param city the city value to set + * @return the AvailableProvidersListParametersInner object itself. + */ + public AvailableProvidersListParametersInner withCity(String city) { + this.city = city; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/AzureReachabilityReportInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/AzureReachabilityReportInner.java new file mode 100644 index 00000000000..605a32fca35 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/AzureReachabilityReportInner.java @@ -0,0 +1,99 @@ +/** + * 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.network.implementation; + +import com.microsoft.azure.management.network.AzureReachabilityReportLocation; +import java.util.List; +import com.microsoft.azure.management.network.AzureReachabilityReportItem; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Azure reachability report details. + */ +public class AzureReachabilityReportInner { + /** + * The aggregation level of Azure reachability report. Can be Country, + * State or City. + */ + @JsonProperty(value = "aggregationLevel", required = true) + private String aggregationLevel; + + /** + * The providerLocation property. + */ + @JsonProperty(value = "providerLocation", required = true) + private AzureReachabilityReportLocation providerLocation; + + /** + * List of Azure reachability report items. + */ + @JsonProperty(value = "reachabilityReport", required = true) + private List reachabilityReport; + + /** + * Get the aggregation level of Azure reachability report. Can be Country, State or City. + * + * @return the aggregationLevel value + */ + public String aggregationLevel() { + return this.aggregationLevel; + } + + /** + * Set the aggregation level of Azure reachability report. Can be Country, State or City. + * + * @param aggregationLevel the aggregationLevel value to set + * @return the AzureReachabilityReportInner object itself. + */ + public AzureReachabilityReportInner withAggregationLevel(String aggregationLevel) { + this.aggregationLevel = aggregationLevel; + return this; + } + + /** + * Get the providerLocation value. + * + * @return the providerLocation value + */ + public AzureReachabilityReportLocation providerLocation() { + return this.providerLocation; + } + + /** + * Set the providerLocation value. + * + * @param providerLocation the providerLocation value to set + * @return the AzureReachabilityReportInner object itself. + */ + public AzureReachabilityReportInner withProviderLocation(AzureReachabilityReportLocation providerLocation) { + this.providerLocation = providerLocation; + return this; + } + + /** + * Get list of Azure reachability report items. + * + * @return the reachabilityReport value + */ + public List reachabilityReport() { + return this.reachabilityReport; + } + + /** + * Set list of Azure reachability report items. + * + * @param reachabilityReport the reachabilityReport value to set + * @return the AzureReachabilityReportInner object itself. + */ + public AzureReachabilityReportInner withReachabilityReport(List reachabilityReport) { + this.reachabilityReport = reachabilityReport; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/AzureReachabilityReportParametersInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/AzureReachabilityReportParametersInner.java new file mode 100644 index 00000000000..95f5a03be4c --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/AzureReachabilityReportParametersInner.java @@ -0,0 +1,150 @@ +/** + * 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.network.implementation; + +import com.microsoft.azure.management.network.AzureReachabilityReportLocation; +import java.util.List; +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Geographic and time constraints for Azure reachability report. + */ +public class AzureReachabilityReportParametersInner { + /** + * The providerLocation property. + */ + @JsonProperty(value = "providerLocation", required = true) + private AzureReachabilityReportLocation providerLocation; + + /** + * List of Internet service providers. + */ + @JsonProperty(value = "providers") + private List providers; + + /** + * Optional Azure regions to scope the query to. + */ + @JsonProperty(value = "azureLocations") + private List azureLocations; + + /** + * The start time for the Azure reachability report. + */ + @JsonProperty(value = "startTime", required = true) + private DateTime startTime; + + /** + * The end time for the Azure reachability report. + */ + @JsonProperty(value = "endTime", required = true) + private DateTime endTime; + + /** + * Get the providerLocation value. + * + * @return the providerLocation value + */ + public AzureReachabilityReportLocation providerLocation() { + return this.providerLocation; + } + + /** + * Set the providerLocation value. + * + * @param providerLocation the providerLocation value to set + * @return the AzureReachabilityReportParametersInner object itself. + */ + public AzureReachabilityReportParametersInner withProviderLocation(AzureReachabilityReportLocation providerLocation) { + this.providerLocation = providerLocation; + return this; + } + + /** + * Get the providers value. + * + * @return the providers value + */ + public List providers() { + return this.providers; + } + + /** + * Set the providers value. + * + * @param providers the providers value to set + * @return the AzureReachabilityReportParametersInner object itself. + */ + public AzureReachabilityReportParametersInner withProviders(List providers) { + this.providers = providers; + return this; + } + + /** + * Get the azureLocations value. + * + * @return the azureLocations value + */ + public List azureLocations() { + return this.azureLocations; + } + + /** + * Set the azureLocations value. + * + * @param azureLocations the azureLocations value to set + * @return the AzureReachabilityReportParametersInner object itself. + */ + public AzureReachabilityReportParametersInner withAzureLocations(List azureLocations) { + this.azureLocations = azureLocations; + return this; + } + + /** + * Get the startTime value. + * + * @return the startTime value + */ + public DateTime startTime() { + return this.startTime; + } + + /** + * Set the startTime value. + * + * @param startTime the startTime value to set + * @return the AzureReachabilityReportParametersInner object itself. + */ + public AzureReachabilityReportParametersInner withStartTime(DateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the endTime value. + * + * @return the endTime value + */ + public DateTime endTime() { + return this.endTime; + } + + /** + * Set the endTime value. + * + * @param endTime the endTime value to set + * @return the AzureReachabilityReportParametersInner object itself. + */ + public AzureReachabilityReportParametersInner withEndTime(DateTime endTime) { + this.endTime = endTime; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/BackendAddressPoolInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/BackendAddressPoolInner.java index 4b5b262df83..e0a40e5b9f2 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/BackendAddressPoolInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/BackendAddressPoolInner.java @@ -58,7 +58,7 @@ public class BackendAddressPoolInner extends SubResource { private String etag; /** - * Get the backendIPConfigurations value. + * Get gets collection of references to IP addresses defined in network interfaces. * * @return the backendIPConfigurations value */ @@ -67,7 +67,7 @@ public List backendIPConfigurations() { } /** - * Get the loadBalancingRules value. + * Get gets load balancing rules that use this backend address pool. * * @return the loadBalancingRules value */ @@ -76,7 +76,7 @@ public List loadBalancingRules() { } /** - * Get the outboundNatRule value. + * Get gets outbound rules that use this backend address pool. * * @return the outboundNatRule value */ @@ -85,7 +85,7 @@ public SubResource outboundNatRule() { } /** - * Get the provisioningState value. + * Get get provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. * * @return the provisioningState value */ @@ -94,7 +94,7 @@ public String provisioningState() { } /** - * Set the provisioningState value. + * Set get provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. * * @param provisioningState the provisioningState value to set * @return the BackendAddressPoolInner object itself. @@ -105,7 +105,7 @@ public BackendAddressPoolInner withProvisioningState(String provisioningState) { } /** - * Get the name value. + * Get gets name of the resource that is unique within a resource group. This name can be used to access the resource. * * @return the name value */ @@ -114,7 +114,7 @@ public String name() { } /** - * Set the name value. + * Set gets name of the resource that is unique within a resource group. This name can be used to access the resource. * * @param name the name value to set * @return the BackendAddressPoolInner object itself. @@ -125,7 +125,7 @@ public BackendAddressPoolInner withName(String name) { } /** - * Get the etag value. + * Get a unique read-only string that changes whenever the resource is updated. * * @return the etag value */ @@ -134,7 +134,7 @@ public String etag() { } /** - * Set the etag value. + * Set a unique read-only string that changes whenever the resource is updated. * * @param etag the etag value to set * @return the BackendAddressPoolInner object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/BgpPeerStatusListResultInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/BgpPeerStatusListResultInner.java index ec22fdf9fed..f1dbd8d4b0e 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/BgpPeerStatusListResultInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/BgpPeerStatusListResultInner.java @@ -23,7 +23,7 @@ public class BgpPeerStatusListResultInner { private List value; /** - * Get the value value. + * Get list of BGP peers. * * @return the value value */ @@ -32,7 +32,7 @@ public List value() { } /** - * Set the value value. + * Set list of BGP peers. * * @param value the value value to set * @return the BgpPeerStatusListResultInner object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/BgpServiceCommunitiesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/BgpServiceCommunitiesInner.java index fe3a584896e..567d0cbddc0 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/BgpServiceCommunitiesInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/BgpServiceCommunitiesInner.java @@ -149,7 +149,7 @@ public Observable>> listSinglePag if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/BgpServiceCommunityInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/BgpServiceCommunityInner.java index 0ecc6970e6c..f927c63f5d5 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/BgpServiceCommunityInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/BgpServiceCommunityInner.java @@ -12,12 +12,14 @@ import com.microsoft.azure.management.network.BGPCommunity; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; import com.microsoft.azure.Resource; /** * Service Community Properties. */ @JsonFlatten +@SkipParentValidation public class BgpServiceCommunityInner extends Resource { /** * The name of the bgp community. e.g. Skype. @@ -32,7 +34,13 @@ public class BgpServiceCommunityInner extends Resource { private List bgpCommunities; /** - * Get the serviceName value. + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get the name of the bgp community. e.g. Skype. * * @return the serviceName value */ @@ -41,7 +49,7 @@ public String serviceName() { } /** - * Set the serviceName value. + * Set the name of the bgp community. e.g. Skype. * * @param serviceName the serviceName value to set * @return the BgpServiceCommunityInner object itself. @@ -52,7 +60,7 @@ public BgpServiceCommunityInner withServiceName(String serviceName) { } /** - * Get the bgpCommunities value. + * Get get a list of bgp communities. * * @return the bgpCommunities value */ @@ -61,7 +69,7 @@ public List bgpCommunities() { } /** - * Set the bgpCommunities value. + * Set get a list of bgp communities. * * @param bgpCommunities the bgpCommunities value to set * @return the BgpServiceCommunityInner object itself. @@ -71,4 +79,24 @@ public BgpServiceCommunityInner withBgpCommunities(List bgpCommuni return this; } + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the BgpServiceCommunityInner object itself. + */ + public BgpServiceCommunityInner withId(String id) { + this.id = id; + return this; + } + } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionMonitorInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionMonitorInner.java new file mode 100644 index 00000000000..dd0fd5215c5 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionMonitorInner.java @@ -0,0 +1,179 @@ +/** + * 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.network.implementation; + +import java.util.Map; +import com.microsoft.azure.management.network.ConnectionMonitorSource; +import com.microsoft.azure.management.network.ConnectionMonitorDestination; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Parameters that define the operation to create a connection monitor. + */ +@JsonFlatten +public class ConnectionMonitorInner { + /** + * Connection monitor location. + */ + @JsonProperty(value = "location") + private String location; + + /** + * Connection monitor tags. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * The source property. + */ + @JsonProperty(value = "properties.source", required = true) + private ConnectionMonitorSource source; + + /** + * The destination property. + */ + @JsonProperty(value = "properties.destination", required = true) + private ConnectionMonitorDestination destination; + + /** + * Determines if the connection monitor will start automatically once + * created. + */ + @JsonProperty(value = "properties.autoStart") + private Boolean autoStart; + + /** + * Monitoring interval in seconds. + */ + @JsonProperty(value = "properties.monitoringIntervalInSeconds") + private Integer monitoringIntervalInSeconds; + + /** + * Get connection monitor location. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set connection monitor location. + * + * @param location the location value to set + * @return the ConnectionMonitorInner object itself. + */ + public ConnectionMonitorInner withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get connection monitor tags. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set connection monitor tags. + * + * @param tags the tags value to set + * @return the ConnectionMonitorInner object itself. + */ + public ConnectionMonitorInner withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the source value. + * + * @return the source value + */ + public ConnectionMonitorSource source() { + return this.source; + } + + /** + * Set the source value. + * + * @param source the source value to set + * @return the ConnectionMonitorInner object itself. + */ + public ConnectionMonitorInner withSource(ConnectionMonitorSource source) { + this.source = source; + return this; + } + + /** + * Get the destination value. + * + * @return the destination value + */ + public ConnectionMonitorDestination destination() { + return this.destination; + } + + /** + * Set the destination value. + * + * @param destination the destination value to set + * @return the ConnectionMonitorInner object itself. + */ + public ConnectionMonitorInner withDestination(ConnectionMonitorDestination destination) { + this.destination = destination; + return this; + } + + /** + * Get determines if the connection monitor will start automatically once created. + * + * @return the autoStart value + */ + public Boolean autoStart() { + return this.autoStart; + } + + /** + * Set determines if the connection monitor will start automatically once created. + * + * @param autoStart the autoStart value to set + * @return the ConnectionMonitorInner object itself. + */ + public ConnectionMonitorInner withAutoStart(Boolean autoStart) { + this.autoStart = autoStart; + return this; + } + + /** + * Get monitoring interval in seconds. + * + * @return the monitoringIntervalInSeconds value + */ + public Integer monitoringIntervalInSeconds() { + return this.monitoringIntervalInSeconds; + } + + /** + * Set monitoring interval in seconds. + * + * @param monitoringIntervalInSeconds the monitoringIntervalInSeconds value to set + * @return the ConnectionMonitorInner object itself. + */ + public ConnectionMonitorInner withMonitoringIntervalInSeconds(Integer monitoringIntervalInSeconds) { + this.monitoringIntervalInSeconds = monitoringIntervalInSeconds; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionMonitorQueryResultInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionMonitorQueryResultInner.java new file mode 100644 index 00000000000..eb3eb71ecfc --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionMonitorQueryResultInner.java @@ -0,0 +1,73 @@ +/** + * 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.network.implementation; + +import com.microsoft.azure.management.network.ConnectionMonitorSourceStatus; +import java.util.List; +import com.microsoft.azure.management.network.ConnectionStateSnapshot; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * List of connection states snaphots. + */ +public class ConnectionMonitorQueryResultInner { + /** + * Status of connection monitor source. Possible values include: 'Uknown', + * 'Active', 'Inactive'. + */ + @JsonProperty(value = "sourceStatus") + private ConnectionMonitorSourceStatus sourceStatus; + + /** + * Information about connection states. + */ + @JsonProperty(value = "states") + private List states; + + /** + * Get status of connection monitor source. Possible values include: 'Uknown', 'Active', 'Inactive'. + * + * @return the sourceStatus value + */ + public ConnectionMonitorSourceStatus sourceStatus() { + return this.sourceStatus; + } + + /** + * Set status of connection monitor source. Possible values include: 'Uknown', 'Active', 'Inactive'. + * + * @param sourceStatus the sourceStatus value to set + * @return the ConnectionMonitorQueryResultInner object itself. + */ + public ConnectionMonitorQueryResultInner withSourceStatus(ConnectionMonitorSourceStatus sourceStatus) { + this.sourceStatus = sourceStatus; + return this; + } + + /** + * Get information about connection states. + * + * @return the states value + */ + public List states() { + return this.states; + } + + /** + * Set information about connection states. + * + * @param states the states value to set + * @return the ConnectionMonitorQueryResultInner object itself. + */ + public ConnectionMonitorQueryResultInner withStates(List states) { + this.states = states; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionMonitorResultInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionMonitorResultInner.java new file mode 100644 index 00000000000..c0792a9418e --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionMonitorResultInner.java @@ -0,0 +1,331 @@ +/** + * 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.network.implementation; + +import java.util.Map; +import com.microsoft.azure.management.network.ConnectionMonitorSource; +import com.microsoft.azure.management.network.ConnectionMonitorDestination; +import com.microsoft.azure.management.network.ProvisioningState; +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Information about the connection monitor. + */ +@JsonFlatten +public class ConnectionMonitorResultInner { + /** + * Name of the connection monitor. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * ID of the connection monitor. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * The etag property. + */ + @JsonProperty(value = "etag") + private String etag; + + /** + * Connection monitor type. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Connection monitor location. + */ + @JsonProperty(value = "location") + private String location; + + /** + * Connection monitor tags. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * The source property. + */ + @JsonProperty(value = "properties.source", required = true) + private ConnectionMonitorSource source; + + /** + * The destination property. + */ + @JsonProperty(value = "properties.destination", required = true) + private ConnectionMonitorDestination destination; + + /** + * Determines if the connection monitor will start automatically once + * created. + */ + @JsonProperty(value = "properties.autoStart") + private Boolean autoStart; + + /** + * Monitoring interval in seconds. + */ + @JsonProperty(value = "properties.monitoringIntervalInSeconds") + private Integer monitoringIntervalInSeconds; + + /** + * The provisioning state of the connection monitor. Possible values + * include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState") + private ProvisioningState provisioningState; + + /** + * The date and time when the connection monitor was started. + */ + @JsonProperty(value = "properties.startTime") + private DateTime startTime; + + /** + * The monitoring status of the connection monitor. + */ + @JsonProperty(value = "properties.monitoringStatus") + private String monitoringStatus; + + /** + * Get name of the connection monitor. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get iD of the connection monitor. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Get the etag value. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Set the etag value. + * + * @param etag the etag value to set + * @return the ConnectionMonitorResultInner object itself. + */ + public ConnectionMonitorResultInner withEtag(String etag) { + this.etag = etag; + return this; + } + + /** + * Get connection monitor type. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Get connection monitor location. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set connection monitor location. + * + * @param location the location value to set + * @return the ConnectionMonitorResultInner object itself. + */ + public ConnectionMonitorResultInner withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get connection monitor tags. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set connection monitor tags. + * + * @param tags the tags value to set + * @return the ConnectionMonitorResultInner object itself. + */ + public ConnectionMonitorResultInner withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the source value. + * + * @return the source value + */ + public ConnectionMonitorSource source() { + return this.source; + } + + /** + * Set the source value. + * + * @param source the source value to set + * @return the ConnectionMonitorResultInner object itself. + */ + public ConnectionMonitorResultInner withSource(ConnectionMonitorSource source) { + this.source = source; + return this; + } + + /** + * Get the destination value. + * + * @return the destination value + */ + public ConnectionMonitorDestination destination() { + return this.destination; + } + + /** + * Set the destination value. + * + * @param destination the destination value to set + * @return the ConnectionMonitorResultInner object itself. + */ + public ConnectionMonitorResultInner withDestination(ConnectionMonitorDestination destination) { + this.destination = destination; + return this; + } + + /** + * Get determines if the connection monitor will start automatically once created. + * + * @return the autoStart value + */ + public Boolean autoStart() { + return this.autoStart; + } + + /** + * Set determines if the connection monitor will start automatically once created. + * + * @param autoStart the autoStart value to set + * @return the ConnectionMonitorResultInner object itself. + */ + public ConnectionMonitorResultInner withAutoStart(Boolean autoStart) { + this.autoStart = autoStart; + return this; + } + + /** + * Get monitoring interval in seconds. + * + * @return the monitoringIntervalInSeconds value + */ + public Integer monitoringIntervalInSeconds() { + return this.monitoringIntervalInSeconds; + } + + /** + * Set monitoring interval in seconds. + * + * @param monitoringIntervalInSeconds the monitoringIntervalInSeconds value to set + * @return the ConnectionMonitorResultInner object itself. + */ + public ConnectionMonitorResultInner withMonitoringIntervalInSeconds(Integer monitoringIntervalInSeconds) { + this.monitoringIntervalInSeconds = monitoringIntervalInSeconds; + return this; + } + + /** + * Get the provisioning state of the connection monitor. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Set the provisioning state of the connection monitor. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @param provisioningState the provisioningState value to set + * @return the ConnectionMonitorResultInner object itself. + */ + public ConnectionMonitorResultInner withProvisioningState(ProvisioningState provisioningState) { + this.provisioningState = provisioningState; + return this; + } + + /** + * Get the date and time when the connection monitor was started. + * + * @return the startTime value + */ + public DateTime startTime() { + return this.startTime; + } + + /** + * Set the date and time when the connection monitor was started. + * + * @param startTime the startTime value to set + * @return the ConnectionMonitorResultInner object itself. + */ + public ConnectionMonitorResultInner withStartTime(DateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the monitoring status of the connection monitor. + * + * @return the monitoringStatus value + */ + public String monitoringStatus() { + return this.monitoringStatus; + } + + /** + * Set the monitoring status of the connection monitor. + * + * @param monitoringStatus the monitoringStatus value to set + * @return the ConnectionMonitorResultInner object itself. + */ + public ConnectionMonitorResultInner withMonitoringStatus(String monitoringStatus) { + this.monitoringStatus = monitoringStatus; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionMonitorsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionMonitorsInner.java new file mode 100644 index 00000000000..f9c142e6c54 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionMonitorsInner.java @@ -0,0 +1,1130 @@ +/** + * 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.network.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in ConnectionMonitors. + */ +public class ConnectionMonitorsInner { + /** The Retrofit service to perform REST calls. */ + private ConnectionMonitorsService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of ConnectionMonitorsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ConnectionMonitorsInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(ConnectionMonitorsService.class); + this.client = client; + } + + /** + * The interface defining all the services for ConnectionMonitors to be + * used by Retrofit to perform actually REST calls. + */ + interface ConnectionMonitorsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.ConnectionMonitors createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("connectionMonitorName") String connectionMonitorName, @Path("subscriptionId") String subscriptionId, @Body ConnectionMonitorInner 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.network.ConnectionMonitors beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("connectionMonitorName") String connectionMonitorName, @Path("subscriptionId") String subscriptionId, @Body ConnectionMonitorInner 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.network.ConnectionMonitors get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("connectionMonitorName") String connectionMonitorName, @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.network.ConnectionMonitors delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("connectionMonitorName") String connectionMonitorName, @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.network.ConnectionMonitors beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("connectionMonitorName") String connectionMonitorName, @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.network.ConnectionMonitors stop" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/stop") + Observable> stop(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("connectionMonitorName") String connectionMonitorName, @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.network.ConnectionMonitors beginStop" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/stop") + Observable> beginStop(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("connectionMonitorName") String connectionMonitorName, @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.network.ConnectionMonitors start" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/start") + Observable> start(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("connectionMonitorName") String connectionMonitorName, @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.network.ConnectionMonitors beginStart" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/start") + Observable> beginStart(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("connectionMonitorName") String connectionMonitorName, @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.network.ConnectionMonitors query" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/query") + Observable> query(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("connectionMonitorName") String connectionMonitorName, @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.network.ConnectionMonitors beginQuery" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/query") + Observable> beginQuery(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("connectionMonitorName") String connectionMonitorName, @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.network.ConnectionMonitors list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors") + Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Create or update a connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @param parameters Parameters that define the operation to create a connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ConnectionMonitorResultInner object if successful. + */ + public ConnectionMonitorResultInner createOrUpdate(String resourceGroupName, String networkWatcherName, String connectionMonitorName, ConnectionMonitorInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName, parameters).toBlocking().last().body(); + } + + /** + * Create or update a connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @param parameters Parameters that define the operation to create a connection monitor. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName, ConnectionMonitorInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName, parameters), serviceCallback); + } + + /** + * Create or update a connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @param parameters Parameters that define the operation to create a connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName, ConnectionMonitorInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName, parameters).map(new Func1, ConnectionMonitorResultInner>() { + @Override + public ConnectionMonitorResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @param parameters Parameters that define the operation to create a connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName, ConnectionMonitorInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (connectionMonitorName == null) { + throw new IllegalArgumentException("Parameter connectionMonitorName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2018-04-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create or update a connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @param parameters Parameters that define the operation to create a connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ConnectionMonitorResultInner object if successful. + */ + public ConnectionMonitorResultInner beginCreateOrUpdate(String resourceGroupName, String networkWatcherName, String connectionMonitorName, ConnectionMonitorInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName, parameters).toBlocking().single().body(); + } + + /** + * Create or update a connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @param parameters Parameters that define the operation to create a connection monitor. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName, ConnectionMonitorInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName, parameters), serviceCallback); + } + + /** + * Create or update a connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @param parameters Parameters that define the operation to create a connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ConnectionMonitorResultInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName, ConnectionMonitorInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName, parameters).map(new Func1, ConnectionMonitorResultInner>() { + @Override + public ConnectionMonitorResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @param parameters Parameters that define the operation to create a connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ConnectionMonitorResultInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName, ConnectionMonitorInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (connectionMonitorName == null) { + throw new IllegalArgumentException("Parameter connectionMonitorName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2018-04-01"; + return service.beginCreateOrUpdate(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a connection monitor by name. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ConnectionMonitorResultInner object if successful. + */ + public ConnectionMonitorResultInner get(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + return getWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).toBlocking().single().body(); + } + + /** + * Gets a connection monitor by name. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName), serviceCallback); + } + + /** + * Gets a connection monitor by name. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ConnectionMonitorResultInner object + */ + public Observable getAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + return getWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).map(new Func1, ConnectionMonitorResultInner>() { + @Override + public ConnectionMonitorResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a connection monitor by name. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ConnectionMonitorResultInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (connectionMonitorName == null) { + throw new IllegalArgumentException("Parameter connectionMonitorName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + return service.get(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + deleteWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).toBlocking().last().body(); + } + + /** + * Deletes the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName), serviceCallback); + } + + /** + * Deletes the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + return deleteWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (connectionMonitorName == null) { + throw new IllegalArgumentException("Parameter connectionMonitorName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + Observable> observable = service.delete(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginDelete(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).toBlocking().single().body(); + } + + /** + * Deletes the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDeleteAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName), serviceCallback); + } + + /** + * Deletes the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (connectionMonitorName == null) { + throw new IllegalArgumentException("Parameter connectionMonitorName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + return service.beginDelete(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Stops the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void stop(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + stopWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).toBlocking().last().body(); + } + + /** + * Stops the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture stopAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(stopWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName), serviceCallback); + } + + /** + * Stops the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable stopAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + return stopWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Stops the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> stopWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (connectionMonitorName == null) { + throw new IllegalArgumentException("Parameter connectionMonitorName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + Observable> observable = service.stop(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Stops the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginStop(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + beginStopWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).toBlocking().single().body(); + } + + /** + * Stops the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginStopAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginStopWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName), serviceCallback); + } + + /** + * Stops the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginStopAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + return beginStopWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Stops the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginStopWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (connectionMonitorName == null) { + throw new IllegalArgumentException("Parameter connectionMonitorName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + return service.beginStop(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginStopDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginStopDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Starts the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void start(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + startWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).toBlocking().last().body(); + } + + /** + * Starts the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture startAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(startWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName), serviceCallback); + } + + /** + * Starts the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable startAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + return startWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Starts the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> startWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (connectionMonitorName == null) { + throw new IllegalArgumentException("Parameter connectionMonitorName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + Observable> observable = service.start(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Starts the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginStart(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + beginStartWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).toBlocking().single().body(); + } + + /** + * Starts the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginStartAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginStartWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName), serviceCallback); + } + + /** + * Starts the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginStartAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + return beginStartWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Starts the specified connection monitor. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name of the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginStartWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (connectionMonitorName == null) { + throw new IllegalArgumentException("Parameter connectionMonitorName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + return service.beginStart(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginStartDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginStartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Query a snapshot of the most recent connection states. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name given to the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ConnectionMonitorQueryResultInner object if successful. + */ + public ConnectionMonitorQueryResultInner query(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + return queryWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).toBlocking().last().body(); + } + + /** + * Query a snapshot of the most recent connection states. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name given to the connection monitor. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture queryAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(queryWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName), serviceCallback); + } + + /** + * Query a snapshot of the most recent connection states. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name given to the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable queryAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + return queryWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).map(new Func1, ConnectionMonitorQueryResultInner>() { + @Override + public ConnectionMonitorQueryResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Query a snapshot of the most recent connection states. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name given to the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> queryWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (connectionMonitorName == null) { + throw new IllegalArgumentException("Parameter connectionMonitorName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + Observable> observable = service.query(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Query a snapshot of the most recent connection states. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name given to the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ConnectionMonitorQueryResultInner object if successful. + */ + public ConnectionMonitorQueryResultInner beginQuery(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + return beginQueryWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).toBlocking().single().body(); + } + + /** + * Query a snapshot of the most recent connection states. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name given to the connection monitor. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginQueryAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginQueryWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName), serviceCallback); + } + + /** + * Query a snapshot of the most recent connection states. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name given to the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ConnectionMonitorQueryResultInner object + */ + public Observable beginQueryAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + return beginQueryWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).map(new Func1, ConnectionMonitorQueryResultInner>() { + @Override + public ConnectionMonitorQueryResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Query a snapshot of the most recent connection states. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param connectionMonitorName The name given to the connection monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ConnectionMonitorQueryResultInner object + */ + public Observable> beginQueryWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (connectionMonitorName == null) { + throw new IllegalArgumentException("Parameter connectionMonitorName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + return service.beginQuery(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginQueryDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginQueryDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists all connection monitors for the specified Network Watcher. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<ConnectionMonitorResultInner> object if successful. + */ + public List list(String resourceGroupName, String networkWatcherName) { + return listWithServiceResponseAsync(resourceGroupName, networkWatcherName).toBlocking().single().body(); + } + + /** + * Lists all connection monitors for the specified Network Watcher. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(String resourceGroupName, String networkWatcherName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, networkWatcherName), serviceCallback); + } + + /** + * Lists all connection monitors for the specified Network Watcher. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<ConnectionMonitorResultInner> object + */ + public Observable> listAsync(String resourceGroupName, String networkWatcherName) { + return listWithServiceResponseAsync(resourceGroupName, networkWatcherName).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all connection monitors for the specified Network Watcher. + * + * @param resourceGroupName The name of the resource group containing Network Watcher. + * @param networkWatcherName The name of the Network Watcher resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<ConnectionMonitorResultInner> object + */ + public Observable>> listWithServiceResponseAsync(String resourceGroupName, String networkWatcherName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + return service.list(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionResetSharedKeyInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionResetSharedKeyInner.java index ab024d853d9..3a2b6c3d508 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionResetSharedKeyInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionResetSharedKeyInner.java @@ -22,7 +22,7 @@ public class ConnectionResetSharedKeyInner { private int keyLength; /** - * Get the keyLength value. + * Get the virtual network connection reset shared key length, should between 1 and 128. * * @return the keyLength value */ @@ -31,7 +31,7 @@ public int keyLength() { } /** - * Set the keyLength value. + * Set the virtual network connection reset shared key length, should between 1 and 128. * * @param keyLength the keyLength value to set * @return the ConnectionResetSharedKeyInner object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionSharedKeyInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionSharedKeyInner.java index ab6767f01c3..c61fe6fde53 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionSharedKeyInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionSharedKeyInner.java @@ -21,7 +21,7 @@ public class ConnectionSharedKeyInner { private String value; /** - * Get the value value. + * Get the virtual network connection shared key value. * * @return the value value */ @@ -30,7 +30,7 @@ public String value() { } /** - * Set the value value. + * Set the virtual network connection shared key value. * * @param value the value value to set * @return the ConnectionSharedKeyInner object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectivityInformationInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectivityInformationInner.java index 681d201b323..521d9c72a92 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectivityInformationInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectivityInformationInner.java @@ -61,7 +61,7 @@ public class ConnectivityInformationInner { private Integer probesFailed; /** - * Get the hops value. + * Get list of hops between the source and the destination. * * @return the hops value */ @@ -70,7 +70,7 @@ public List hops() { } /** - * Get the connectionStatus value. + * Get the connection status. Possible values include: 'Unknown', 'Connected', 'Disconnected', 'Degraded'. * * @return the connectionStatus value */ @@ -79,7 +79,7 @@ public ConnectionStatus connectionStatus() { } /** - * Get the avgLatencyInMs value. + * Get average latency in milliseconds. * * @return the avgLatencyInMs value */ @@ -88,7 +88,7 @@ public Integer avgLatencyInMs() { } /** - * Get the minLatencyInMs value. + * Get minimum latency in milliseconds. * * @return the minLatencyInMs value */ @@ -97,7 +97,7 @@ public Integer minLatencyInMs() { } /** - * Get the maxLatencyInMs value. + * Get maximum latency in milliseconds. * * @return the maxLatencyInMs value */ @@ -106,7 +106,7 @@ public Integer maxLatencyInMs() { } /** - * Get the probesSent value. + * Get total number of probes sent. * * @return the probesSent value */ @@ -115,7 +115,7 @@ public Integer probesSent() { } /** - * Get the probesFailed value. + * Get number of failed probes. * * @return the probesFailed value */ diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectivityParametersInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectivityParametersInner.java index e0742f8b55e..b85e7952ee0 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectivityParametersInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectivityParametersInner.java @@ -10,6 +10,8 @@ import com.microsoft.azure.management.network.ConnectivitySource; import com.microsoft.azure.management.network.ConnectivityDestination; +import com.microsoft.azure.management.network.Protocol; +import com.microsoft.azure.management.network.ProtocolConfiguration; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -28,6 +30,19 @@ public class ConnectivityParametersInner { @JsonProperty(value = "destination", required = true) private ConnectivityDestination destination; + /** + * Network protocol. Possible values include: 'Tcp', 'Http', 'Https', + * 'Icmp'. + */ + @JsonProperty(value = "protocol") + private Protocol protocol; + + /** + * The protocolConfiguration property. + */ + @JsonProperty(value = "protocolConfiguration") + private ProtocolConfiguration protocolConfiguration; + /** * Get the source value. * @@ -68,4 +83,44 @@ public ConnectivityParametersInner withDestination(ConnectivityDestination desti return this; } + /** + * Get the protocol value. + * + * @return the protocol value + */ + public Protocol protocol() { + return this.protocol; + } + + /** + * Set the protocol value. + * + * @param protocol the protocol value to set + * @return the ConnectivityParametersInner object itself. + */ + public ConnectivityParametersInner withProtocol(Protocol protocol) { + this.protocol = protocol; + return this; + } + + /** + * Get the protocolConfiguration value. + * + * @return the protocolConfiguration value + */ + public ProtocolConfiguration protocolConfiguration() { + return this.protocolConfiguration; + } + + /** + * Set the protocolConfiguration value. + * + * @param protocolConfiguration the protocolConfiguration value to set + * @return the ConnectivityParametersInner object itself. + */ + public ConnectivityParametersInner withProtocolConfiguration(ProtocolConfiguration protocolConfiguration) { + this.protocolConfiguration = protocolConfiguration; + return this; + } + } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/DdosProtectionPlanInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/DdosProtectionPlanInner.java new file mode 100644 index 00000000000..f51d71e46d0 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/DdosProtectionPlanInner.java @@ -0,0 +1,183 @@ +/** + * 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.network.implementation; + +import java.util.Map; +import java.util.List; +import com.microsoft.azure.SubResource; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * A DDoS protection plan in a resource group. + */ +@JsonFlatten +public class DdosProtectionPlanInner { + /** + * Resource ID. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * Resource name. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * Resource type. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Resource location. + */ + @JsonProperty(value = "location") + private String location; + + /** + * Resource tags. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * The resource GUID property of the DDoS protection plan resource. It + * uniquely identifies the resource, even if the user changes its name or + * migrate the resource across subscriptions or resource groups. + */ + @JsonProperty(value = "properties.resourceGuid", access = JsonProperty.Access.WRITE_ONLY) + private String resourceGuid; + + /** + * The provisioning state of the DDoS protection plan resource. Possible + * values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /** + * The list of virtual networks associated with the DDoS protection plan + * resource. This list is read-only. + */ + @JsonProperty(value = "properties.virtualNetworks", access = JsonProperty.Access.WRITE_ONLY) + private List virtualNetworks; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Get resource name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get resource type. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * 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 DdosProtectionPlanInner object itself. + */ + public DdosProtectionPlanInner withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get resource tags. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set resource tags. + * + * @param tags the tags value to set + * @return the DdosProtectionPlanInner object itself. + */ + public DdosProtectionPlanInner withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the resource GUID property of the DDoS protection plan resource. It uniquely identifies the resource, even if the user changes its name or migrate the resource across subscriptions or resource groups. + * + * @return the resourceGuid value + */ + public String resourceGuid() { + return this.resourceGuid; + } + + /** + * Get the provisioning state of the DDoS protection plan resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'. + * + * @return the provisioningState value + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the list of virtual networks associated with the DDoS protection plan resource. This list is read-only. + * + * @return the virtualNetworks value + */ + public List virtualNetworks() { + return this.virtualNetworks; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/DdosProtectionPlansInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/DdosProtectionPlansInner.java new file mode 100644 index 00000000000..86d9ce2de88 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/DdosProtectionPlansInner.java @@ -0,0 +1,948 @@ +/** + * 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.network.implementation; + +import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet; +import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete; +import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsListing; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in DdosProtectionPlans. + */ +public class DdosProtectionPlansInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private DdosProtectionPlansService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of DdosProtectionPlansInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public DdosProtectionPlansInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(DdosProtectionPlansService.class); + this.client = client; + } + + /** + * The interface defining all the services for DdosProtectionPlans to be + * used by Retrofit to perform actually REST calls. + */ + interface DdosProtectionPlansService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.DdosProtectionPlans delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("ddosProtectionPlanName") String ddosProtectionPlanName, @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.network.DdosProtectionPlans beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("ddosProtectionPlanName") String ddosProtectionPlanName, @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.network.DdosProtectionPlans getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}") + Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("ddosProtectionPlanName") String ddosProtectionPlanName, @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.network.DdosProtectionPlans createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("ddosProtectionPlanName") String ddosProtectionPlanName, @Path("subscriptionId") String subscriptionId, @Body DdosProtectionPlanInner 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.network.DdosProtectionPlans beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("ddosProtectionPlanName") String ddosProtectionPlanName, @Path("subscriptionId") String subscriptionId, @Body DdosProtectionPlanInner 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.network.DdosProtectionPlans list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/ddosProtectionPlans") + Observable> list(@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.network.DdosProtectionPlans listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @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.network.DdosProtectionPlans listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @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.network.DdosProtectionPlans listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Deletes the specified DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String ddosProtectionPlanName) { + deleteWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName).toBlocking().last().body(); + } + + /** + * Deletes the specified DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String ddosProtectionPlanName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName), serviceCallback); + } + + /** + * Deletes the specified DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String ddosProtectionPlanName) { + return deleteWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String ddosProtectionPlanName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (ddosProtectionPlanName == null) { + throw new IllegalArgumentException("Parameter ddosProtectionPlanName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + Observable> observable = service.delete(resourceGroupName, ddosProtectionPlanName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginDelete(String resourceGroupName, String ddosProtectionPlanName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName).toBlocking().single().body(); + } + + /** + * Deletes the specified DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDeleteAsync(String resourceGroupName, String ddosProtectionPlanName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName), serviceCallback); + } + + /** + * Deletes the specified DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String ddosProtectionPlanName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String ddosProtectionPlanName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (ddosProtectionPlanName == null) { + throw new IllegalArgumentException("Parameter ddosProtectionPlanName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + return service.beginDelete(resourceGroupName, ddosProtectionPlanName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets information about the specified DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DdosProtectionPlanInner object if successful. + */ + public DdosProtectionPlanInner getByResourceGroup(String resourceGroupName, String ddosProtectionPlanName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName).toBlocking().single().body(); + } + + /** + * Gets information about the specified DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String ddosProtectionPlanName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName), serviceCallback); + } + + /** + * Gets information about the specified DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DdosProtectionPlanInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String ddosProtectionPlanName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName).map(new Func1, DdosProtectionPlanInner>() { + @Override + public DdosProtectionPlanInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets information about the specified DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DdosProtectionPlanInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String ddosProtectionPlanName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (ddosProtectionPlanName == null) { + throw new IllegalArgumentException("Parameter ddosProtectionPlanName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + return service.getByResourceGroup(resourceGroupName, ddosProtectionPlanName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates or updates a DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @param parameters Parameters supplied to the create or update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DdosProtectionPlanInner object if successful. + */ + public DdosProtectionPlanInner createOrUpdate(String resourceGroupName, String ddosProtectionPlanName, DdosProtectionPlanInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName, parameters).toBlocking().last().body(); + } + + /** + * Creates or updates a DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @param parameters Parameters supplied to the create or update operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String ddosProtectionPlanName, DdosProtectionPlanInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName, parameters), serviceCallback); + } + + /** + * Creates or updates a DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @param parameters Parameters supplied to the create or update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String ddosProtectionPlanName, DdosProtectionPlanInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName, parameters).map(new Func1, DdosProtectionPlanInner>() { + @Override + public DdosProtectionPlanInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @param parameters Parameters supplied to the create or update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String ddosProtectionPlanName, DdosProtectionPlanInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (ddosProtectionPlanName == null) { + throw new IllegalArgumentException("Parameter ddosProtectionPlanName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2018-04-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, ddosProtectionPlanName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates a DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @param parameters Parameters supplied to the create or update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DdosProtectionPlanInner object if successful. + */ + public DdosProtectionPlanInner beginCreateOrUpdate(String resourceGroupName, String ddosProtectionPlanName, DdosProtectionPlanInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates a DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @param parameters Parameters supplied to the create or update operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String ddosProtectionPlanName, DdosProtectionPlanInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName, parameters), serviceCallback); + } + + /** + * Creates or updates a DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @param parameters Parameters supplied to the create or update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DdosProtectionPlanInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String ddosProtectionPlanName, DdosProtectionPlanInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName, parameters).map(new Func1, DdosProtectionPlanInner>() { + @Override + public DdosProtectionPlanInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @param parameters Parameters supplied to the create or update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DdosProtectionPlanInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String ddosProtectionPlanName, DdosProtectionPlanInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (ddosProtectionPlanName == null) { + throw new IllegalArgumentException("Parameter ddosProtectionPlanName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2018-04-01"; + return service.beginCreateOrUpdate(resourceGroupName, ddosProtectionPlanName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets all DDoS protection plans in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<DdosProtectionPlanInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all DDoS protection plans in a subscription. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all DDoS protection plans in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DdosProtectionPlanInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all DDoS protection plans in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DdosProtectionPlanInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all DDoS protection plans in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DdosProtectionPlanInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets all the DDoS protection plans in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<DdosProtectionPlanInner> object if successful. + */ + public PagedList listByResourceGroup(final String resourceGroupName) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all the DDoS protection plans in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(resourceGroupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all the DDoS protection plans in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DdosProtectionPlanInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the DDoS protection plans in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DdosProtectionPlanInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { + return listByResourceGroupSinglePageAsync(resourceGroupName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all the DDoS protection plans in a resource group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DdosProtectionPlanInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets all DDoS protection plans in a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<DdosProtectionPlanInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all DDoS protection plans in a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all DDoS protection plans in a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DdosProtectionPlanInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all DDoS protection plans in a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DdosProtectionPlanInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all DDoS protection plans in a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DdosProtectionPlanInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets all the DDoS protection plans in a resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<DdosProtectionPlanInner> object if successful. + */ + public PagedList listByResourceGroupNext(final String nextPageLink) { + ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all the DDoS protection plans in a resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all the DDoS protection plans in a resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DdosProtectionPlanInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the DDoS protection plans in a resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DdosProtectionPlanInner> object + */ + public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all the DDoS protection plans in a resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DdosProtectionPlanInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/DefaultSecurityRulesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/DefaultSecurityRulesInner.java index dbd80a3c090..eee7453ba2a 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/DefaultSecurityRulesInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/DefaultSecurityRulesInner.java @@ -170,7 +170,7 @@ public Observable>> listSinglePageAsync( if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -261,7 +261,7 @@ public Observable> getWithServiceResponseAsyn if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.get(resourceGroupName, networkSecurityGroupName, defaultSecurityRuleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/DnsNameAvailabilityResultInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/DnsNameAvailabilityResultInner.java index be0ccbf0a82..9f7141c3d4a 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/DnsNameAvailabilityResultInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/DnsNameAvailabilityResultInner.java @@ -21,7 +21,7 @@ public class DnsNameAvailabilityResultInner { private Boolean available; /** - * Get the available value. + * Get domain availability (True/False). * * @return the available value */ @@ -30,7 +30,7 @@ public Boolean available() { } /** - * Set the available value. + * Set domain availability (True/False). * * @param available the available value to set * @return the DnsNameAvailabilityResultInner object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/EffectiveNetworkSecurityGroupListResultInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/EffectiveNetworkSecurityGroupListResultInner.java new file mode 100644 index 00000000000..e280f99b698 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/EffectiveNetworkSecurityGroupListResultInner.java @@ -0,0 +1,60 @@ +/** + * 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.network.implementation; + +import java.util.List; +import com.microsoft.azure.management.network.EffectiveNetworkSecurityGroup; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Response for list effective network security groups API service call. + */ +public class EffectiveNetworkSecurityGroupListResultInner { + /** + * A list of effective network security groups. + */ + @JsonProperty(value = "value") + private List value; + + /** + * The URL to get the next set of results. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Get a list of effective network security groups. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set a list of effective network security groups. + * + * @param value the value value to set + * @return the EffectiveNetworkSecurityGroupListResultInner object itself. + */ + public EffectiveNetworkSecurityGroupListResultInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the URL to get the next set of results. + * + * @return the nextLink value + */ + public String nextLink() { + return this.nextLink; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/EffectiveRouteListResultInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/EffectiveRouteListResultInner.java new file mode 100644 index 00000000000..59593a878da --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/EffectiveRouteListResultInner.java @@ -0,0 +1,60 @@ +/** + * 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.network.implementation; + +import java.util.List; +import com.microsoft.azure.management.network.EffectiveRoute; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Response for list effective route API service call. + */ +public class EffectiveRouteListResultInner { + /** + * A list of effective routes. + */ + @JsonProperty(value = "value") + private List value; + + /** + * The URL to get the next set of results. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Get a list of effective routes. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set a list of effective routes. + * + * @param value the value value to set + * @return the EffectiveRouteListResultInner object itself. + */ + public EffectiveRouteListResultInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the URL to get the next set of results. + * + * @return the nextLink value + */ + public String nextLink() { + return this.nextLink; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/EndpointServiceResultInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/EndpointServiceResultInner.java new file mode 100644 index 00000000000..0ff83099f3a --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/EndpointServiceResultInner.java @@ -0,0 +1,48 @@ +/** + * 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.network.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.SubResource; + +/** + * Endpoint service. + */ +public class EndpointServiceResultInner extends SubResource { + /** + * Name of the endpoint service. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * Type of the endpoint service. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get name of the endpoint service. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get type of the endpoint service. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitAuthorizationInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitAuthorizationInner.java index f34e36e38cc..7c9f50303d6 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitAuthorizationInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitAuthorizationInner.java @@ -52,7 +52,7 @@ public class ExpressRouteCircuitAuthorizationInner extends SubResource { private String etag; /** - * Get the authorizationKey value. + * Get the authorization key. * * @return the authorizationKey value */ @@ -61,7 +61,7 @@ public String authorizationKey() { } /** - * Set the authorizationKey value. + * Set the authorization key. * * @param authorizationKey the authorizationKey value to set * @return the ExpressRouteCircuitAuthorizationInner object itself. @@ -72,7 +72,7 @@ public ExpressRouteCircuitAuthorizationInner withAuthorizationKey(String authori } /** - * Get the authorizationUseStatus value. + * Get authorizationUseStatus. Possible values are: 'Available' and 'InUse'. Possible values include: 'Available', 'InUse'. * * @return the authorizationUseStatus value */ @@ -81,7 +81,7 @@ public AuthorizationUseStatus authorizationUseStatus() { } /** - * Set the authorizationUseStatus value. + * Set authorizationUseStatus. Possible values are: 'Available' and 'InUse'. Possible values include: 'Available', 'InUse'. * * @param authorizationUseStatus the authorizationUseStatus value to set * @return the ExpressRouteCircuitAuthorizationInner object itself. @@ -92,7 +92,7 @@ public ExpressRouteCircuitAuthorizationInner withAuthorizationUseStatus(Authoriz } /** - * Get the provisioningState value. + * Get gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. * * @return the provisioningState value */ @@ -101,7 +101,7 @@ public String provisioningState() { } /** - * Set the provisioningState value. + * Set gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. * * @param provisioningState the provisioningState value to set * @return the ExpressRouteCircuitAuthorizationInner object itself. @@ -112,7 +112,7 @@ public ExpressRouteCircuitAuthorizationInner withProvisioningState(String provis } /** - * Get the name value. + * Get gets name of the resource that is unique within a resource group. This name can be used to access the resource. * * @return the name value */ @@ -121,7 +121,7 @@ public String name() { } /** - * Set the name value. + * Set gets name of the resource that is unique within a resource group. This name can be used to access the resource. * * @param name the name value to set * @return the ExpressRouteCircuitAuthorizationInner object itself. @@ -132,7 +132,7 @@ public ExpressRouteCircuitAuthorizationInner withName(String name) { } /** - * Get the etag value. + * Get a unique read-only string that changes whenever the resource is updated. * * @return the etag value */ diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitAuthorizationsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitAuthorizationsInner.java index 834fc180572..009eb0b3a32 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitAuthorizationsInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitAuthorizationsInner.java @@ -159,7 +159,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.delete(resourceGroupName, circuitName, authorizationName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -232,7 +232,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, circuitName, authorizationName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -249,8 +249,8 @@ public Observable> call(Response response) { private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(202, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -325,7 +325,7 @@ public Observable> getWit if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.get(resourceGroupName, circuitName, authorizationName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -424,7 +424,7 @@ public Observable> create throw new IllegalArgumentException("Parameter authorizationParameters is required and cannot be null."); } Validator.validate(authorizationParameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.createOrUpdate(resourceGroupName, circuitName, authorizationName, this.client.subscriptionId(), authorizationParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -506,7 +506,7 @@ public Observable> beginC throw new IllegalArgumentException("Parameter authorizationParameters is required and cannot be null."); } Validator.validate(authorizationParameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, circuitName, authorizationName, this.client.subscriptionId(), authorizationParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -523,8 +523,8 @@ public Observable> call(R private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(201, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -628,7 +628,7 @@ public Observable>> if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(resourceGroupName, circuitName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitConnectionInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitConnectionInner.java new file mode 100644 index 00000000000..e6858a237b6 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitConnectionInner.java @@ -0,0 +1,202 @@ +/** + * 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.network.implementation; + +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.network.CircuitConnectionStatus; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Express Route Circuit Connection in an ExpressRouteCircuitPeering resource. + */ +@JsonFlatten +public class ExpressRouteCircuitConnectionInner extends SubResource { + /** + * Reference to Express Route Circuit Private Peering Resource of the + * circuit initiating connection. + */ + @JsonProperty(value = "properties.expressRouteCircuitPeering") + private SubResource expressRouteCircuitPeering; + + /** + * Reference to Express Route Circuit Private Peering Resource of the + * peered circuit. + */ + @JsonProperty(value = "properties.peerExpressRouteCircuitPeering") + private SubResource peerExpressRouteCircuitPeering; + + /** + * /29 IP address space to carve out Customer addresses for tunnels. + */ + @JsonProperty(value = "properties.addressPrefix") + private String addressPrefix; + + /** + * The authorization key. + */ + @JsonProperty(value = "properties.authorizationKey") + private String authorizationKey; + + /** + * Express Route Circuit Connection State. Possible values are: 'Connected' + * and 'Disconnected'. Possible values include: 'Connected', 'Connecting', + * 'Disconnected'. + */ + @JsonProperty(value = "properties.circuitConnectionStatus", access = JsonProperty.Access.WRITE_ONLY) + private CircuitConnectionStatus circuitConnectionStatus; + + /** + * Provisioning state of the circuit connection resource. Possible values + * are: 'Succeded', 'Updating', 'Deleting', and 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /** + * Gets name of the resource that is unique within a resource group. This + * name can be used to access the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Get reference to Express Route Circuit Private Peering Resource of the circuit initiating connection. + * + * @return the expressRouteCircuitPeering value + */ + public SubResource expressRouteCircuitPeering() { + return this.expressRouteCircuitPeering; + } + + /** + * Set reference to Express Route Circuit Private Peering Resource of the circuit initiating connection. + * + * @param expressRouteCircuitPeering the expressRouteCircuitPeering value to set + * @return the ExpressRouteCircuitConnectionInner object itself. + */ + public ExpressRouteCircuitConnectionInner withExpressRouteCircuitPeering(SubResource expressRouteCircuitPeering) { + this.expressRouteCircuitPeering = expressRouteCircuitPeering; + return this; + } + + /** + * Get reference to Express Route Circuit Private Peering Resource of the peered circuit. + * + * @return the peerExpressRouteCircuitPeering value + */ + public SubResource peerExpressRouteCircuitPeering() { + return this.peerExpressRouteCircuitPeering; + } + + /** + * Set reference to Express Route Circuit Private Peering Resource of the peered circuit. + * + * @param peerExpressRouteCircuitPeering the peerExpressRouteCircuitPeering value to set + * @return the ExpressRouteCircuitConnectionInner object itself. + */ + public ExpressRouteCircuitConnectionInner withPeerExpressRouteCircuitPeering(SubResource peerExpressRouteCircuitPeering) { + this.peerExpressRouteCircuitPeering = peerExpressRouteCircuitPeering; + return this; + } + + /** + * Get /29 IP address space to carve out Customer addresses for tunnels. + * + * @return the addressPrefix value + */ + public String addressPrefix() { + return this.addressPrefix; + } + + /** + * Set /29 IP address space to carve out Customer addresses for tunnels. + * + * @param addressPrefix the addressPrefix value to set + * @return the ExpressRouteCircuitConnectionInner object itself. + */ + public ExpressRouteCircuitConnectionInner withAddressPrefix(String addressPrefix) { + this.addressPrefix = addressPrefix; + return this; + } + + /** + * Get the authorization key. + * + * @return the authorizationKey value + */ + public String authorizationKey() { + return this.authorizationKey; + } + + /** + * Set the authorization key. + * + * @param authorizationKey the authorizationKey value to set + * @return the ExpressRouteCircuitConnectionInner object itself. + */ + public ExpressRouteCircuitConnectionInner withAuthorizationKey(String authorizationKey) { + this.authorizationKey = authorizationKey; + return this; + } + + /** + * Get express Route Circuit Connection State. Possible values are: 'Connected' and 'Disconnected'. Possible values include: 'Connected', 'Connecting', 'Disconnected'. + * + * @return the circuitConnectionStatus value + */ + public CircuitConnectionStatus circuitConnectionStatus() { + return this.circuitConnectionStatus; + } + + /** + * Get provisioning state of the circuit connection resource. Possible values are: 'Succeded', 'Updating', 'Deleting', and 'Failed'. + * + * @return the provisioningState value + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get gets name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set gets name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @param name the name value to set + * @return the ExpressRouteCircuitConnectionInner object itself. + */ + public ExpressRouteCircuitConnectionInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitConnectionsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitConnectionsInner.java new file mode 100644 index 00000000000..9f4c16c01d5 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitConnectionsInner.java @@ -0,0 +1,553 @@ +/** + * 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.network.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in ExpressRouteCircuitConnections. + */ +public class ExpressRouteCircuitConnectionsInner { + /** The Retrofit service to perform REST calls. */ + private ExpressRouteCircuitConnectionsService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of ExpressRouteCircuitConnectionsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ExpressRouteCircuitConnectionsInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(ExpressRouteCircuitConnectionsService.class); + this.client = client; + } + + /** + * The interface defining all the services for ExpressRouteCircuitConnections to be + * used by Retrofit to perform actually REST calls. + */ + interface ExpressRouteCircuitConnectionsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.ExpressRouteCircuitConnections delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @Path("peeringName") String peeringName, @Path("connectionName") String connectionName, @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.network.ExpressRouteCircuitConnections beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @Path("peeringName") String peeringName, @Path("connectionName") String connectionName, @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.network.ExpressRouteCircuitConnections get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @Path("peeringName") String peeringName, @Path("connectionName") String connectionName, @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.network.ExpressRouteCircuitConnections createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @Path("peeringName") String peeringName, @Path("connectionName") String connectionName, @Path("subscriptionId") String subscriptionId, @Body ExpressRouteCircuitConnectionInner expressRouteCircuitConnectionParameters, @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.network.ExpressRouteCircuitConnections beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @Path("peeringName") String peeringName, @Path("connectionName") String connectionName, @Path("subscriptionId") String subscriptionId, @Body ExpressRouteCircuitConnectionInner expressRouteCircuitConnectionParameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Deletes the specified Express Route Circuit Connection from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param connectionName The name of the express route circuit connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String circuitName, String peeringName, String connectionName) { + deleteWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, connectionName).toBlocking().last().body(); + } + + /** + * Deletes the specified Express Route Circuit Connection from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param connectionName The name of the express route circuit connection. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, connectionName), serviceCallback); + } + + /** + * Deletes the specified Express Route Circuit Connection from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param connectionName The name of the express route circuit connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName) { + return deleteWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, connectionName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified Express Route Circuit Connection from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param connectionName The name of the express route circuit connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (circuitName == null) { + throw new IllegalArgumentException("Parameter circuitName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (connectionName == null) { + throw new IllegalArgumentException("Parameter connectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + Observable> observable = service.delete(resourceGroupName, circuitName, peeringName, connectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified Express Route Circuit Connection from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param connectionName The name of the express route circuit connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginDelete(String resourceGroupName, String circuitName, String peeringName, String connectionName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, connectionName).toBlocking().single().body(); + } + + /** + * Deletes the specified Express Route Circuit Connection from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param connectionName The name of the express route circuit connection. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDeleteAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, connectionName), serviceCallback); + } + + /** + * Deletes the specified Express Route Circuit Connection from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param connectionName The name of the express route circuit connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, connectionName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified Express Route Circuit Connection from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param connectionName The name of the express route circuit connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (circuitName == null) { + throw new IllegalArgumentException("Parameter circuitName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (connectionName == null) { + throw new IllegalArgumentException("Parameter connectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + return service.beginDelete(resourceGroupName, circuitName, peeringName, connectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the specified Express Route Circuit Connection from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param connectionName The name of the express route circuit connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ExpressRouteCircuitConnectionInner object if successful. + */ + public ExpressRouteCircuitConnectionInner get(String resourceGroupName, String circuitName, String peeringName, String connectionName) { + return getWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, connectionName).toBlocking().single().body(); + } + + /** + * Gets the specified Express Route Circuit Connection from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param connectionName The name of the express route circuit connection. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, connectionName), serviceCallback); + } + + /** + * Gets the specified Express Route Circuit Connection from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param connectionName The name of the express route circuit connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCircuitConnectionInner object + */ + public Observable getAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName) { + return getWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, connectionName).map(new Func1, ExpressRouteCircuitConnectionInner>() { + @Override + public ExpressRouteCircuitConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified Express Route Circuit Connection from the specified express route circuit. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param connectionName The name of the express route circuit connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCircuitConnectionInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (circuitName == null) { + throw new IllegalArgumentException("Parameter circuitName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (connectionName == null) { + throw new IllegalArgumentException("Parameter connectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + return service.get(resourceGroupName, circuitName, peeringName, connectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates or updates a Express Route Circuit Connection in the specified express route circuits. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param connectionName The name of the express route circuit connection. + * @param expressRouteCircuitConnectionParameters Parameters supplied to the create or update express route circuit circuit connection operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ExpressRouteCircuitConnectionInner object if successful. + */ + public ExpressRouteCircuitConnectionInner createOrUpdate(String resourceGroupName, String circuitName, String peeringName, String connectionName, ExpressRouteCircuitConnectionInner expressRouteCircuitConnectionParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, connectionName, expressRouteCircuitConnectionParameters).toBlocking().last().body(); + } + + /** + * Creates or updates a Express Route Circuit Connection in the specified express route circuits. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param connectionName The name of the express route circuit connection. + * @param expressRouteCircuitConnectionParameters Parameters supplied to the create or update express route circuit circuit connection operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName, ExpressRouteCircuitConnectionInner expressRouteCircuitConnectionParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, connectionName, expressRouteCircuitConnectionParameters), serviceCallback); + } + + /** + * Creates or updates a Express Route Circuit Connection in the specified express route circuits. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param connectionName The name of the express route circuit connection. + * @param expressRouteCircuitConnectionParameters Parameters supplied to the create or update express route circuit circuit connection operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName, ExpressRouteCircuitConnectionInner expressRouteCircuitConnectionParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, connectionName, expressRouteCircuitConnectionParameters).map(new Func1, ExpressRouteCircuitConnectionInner>() { + @Override + public ExpressRouteCircuitConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a Express Route Circuit Connection in the specified express route circuits. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param connectionName The name of the express route circuit connection. + * @param expressRouteCircuitConnectionParameters Parameters supplied to the create or update express route circuit circuit connection operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName, ExpressRouteCircuitConnectionInner expressRouteCircuitConnectionParameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (circuitName == null) { + throw new IllegalArgumentException("Parameter circuitName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (connectionName == null) { + throw new IllegalArgumentException("Parameter connectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (expressRouteCircuitConnectionParameters == null) { + throw new IllegalArgumentException("Parameter expressRouteCircuitConnectionParameters is required and cannot be null."); + } + Validator.validate(expressRouteCircuitConnectionParameters); + final String apiVersion = "2018-04-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, circuitName, peeringName, connectionName, this.client.subscriptionId(), expressRouteCircuitConnectionParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates a Express Route Circuit Connection in the specified express route circuits. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param connectionName The name of the express route circuit connection. + * @param expressRouteCircuitConnectionParameters Parameters supplied to the create or update express route circuit circuit connection operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ExpressRouteCircuitConnectionInner object if successful. + */ + public ExpressRouteCircuitConnectionInner beginCreateOrUpdate(String resourceGroupName, String circuitName, String peeringName, String connectionName, ExpressRouteCircuitConnectionInner expressRouteCircuitConnectionParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, connectionName, expressRouteCircuitConnectionParameters).toBlocking().single().body(); + } + + /** + * Creates or updates a Express Route Circuit Connection in the specified express route circuits. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param connectionName The name of the express route circuit connection. + * @param expressRouteCircuitConnectionParameters Parameters supplied to the create or update express route circuit circuit connection operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName, ExpressRouteCircuitConnectionInner expressRouteCircuitConnectionParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, connectionName, expressRouteCircuitConnectionParameters), serviceCallback); + } + + /** + * Creates or updates a Express Route Circuit Connection in the specified express route circuits. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param connectionName The name of the express route circuit connection. + * @param expressRouteCircuitConnectionParameters Parameters supplied to the create or update express route circuit circuit connection operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCircuitConnectionInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName, ExpressRouteCircuitConnectionInner expressRouteCircuitConnectionParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, connectionName, expressRouteCircuitConnectionParameters).map(new Func1, ExpressRouteCircuitConnectionInner>() { + @Override + public ExpressRouteCircuitConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a Express Route Circuit Connection in the specified express route circuits. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the express route circuit. + * @param peeringName The name of the peering. + * @param connectionName The name of the express route circuit connection. + * @param expressRouteCircuitConnectionParameters Parameters supplied to the create or update express route circuit circuit connection operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCircuitConnectionInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName, ExpressRouteCircuitConnectionInner expressRouteCircuitConnectionParameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (circuitName == null) { + throw new IllegalArgumentException("Parameter circuitName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (connectionName == null) { + throw new IllegalArgumentException("Parameter connectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (expressRouteCircuitConnectionParameters == null) { + throw new IllegalArgumentException("Parameter expressRouteCircuitConnectionParameters is required and cannot be null."); + } + Validator.validate(expressRouteCircuitConnectionParameters); + final String apiVersion = "2018-04-01"; + return service.beginCreateOrUpdate(resourceGroupName, circuitName, peeringName, connectionName, this.client.subscriptionId(), expressRouteCircuitConnectionParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitInner.java index 9255c92b272..b72ef4f0297 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitInner.java @@ -14,12 +14,14 @@ import com.microsoft.azure.management.network.ExpressRouteCircuitServiceProviderProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; import com.microsoft.azure.Resource; /** * ExpressRouteCircuit resource. */ @JsonFlatten +@SkipParentValidation public class ExpressRouteCircuitInner extends Resource { /** * The SKU. @@ -99,7 +101,13 @@ public class ExpressRouteCircuitInner extends Resource { private String etag; /** - * Get the sku value. + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get the SKU. * * @return the sku value */ @@ -108,7 +116,7 @@ public ExpressRouteCircuitSku sku() { } /** - * Set the sku value. + * Set the SKU. * * @param sku the sku value to set * @return the ExpressRouteCircuitInner object itself. @@ -119,7 +127,7 @@ public ExpressRouteCircuitInner withSku(ExpressRouteCircuitSku sku) { } /** - * Get the allowClassicOperations value. + * Get allow classic operations. * * @return the allowClassicOperations value */ @@ -128,7 +136,7 @@ public Boolean allowClassicOperations() { } /** - * Set the allowClassicOperations value. + * Set allow classic operations. * * @param allowClassicOperations the allowClassicOperations value to set * @return the ExpressRouteCircuitInner object itself. @@ -139,7 +147,7 @@ public ExpressRouteCircuitInner withAllowClassicOperations(Boolean allowClassicO } /** - * Get the circuitProvisioningState value. + * Get the CircuitProvisioningState state of the resource. * * @return the circuitProvisioningState value */ @@ -148,7 +156,7 @@ public String circuitProvisioningState() { } /** - * Set the circuitProvisioningState value. + * Set the CircuitProvisioningState state of the resource. * * @param circuitProvisioningState the circuitProvisioningState value to set * @return the ExpressRouteCircuitInner object itself. @@ -159,7 +167,7 @@ public ExpressRouteCircuitInner withCircuitProvisioningState(String circuitProvi } /** - * Get the serviceProviderProvisioningState value. + * Get the ServiceProviderProvisioningState state of the resource. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned', and 'Deprovisioning'. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'. * * @return the serviceProviderProvisioningState value */ @@ -168,7 +176,7 @@ public ServiceProviderProvisioningState serviceProviderProvisioningState() { } /** - * Set the serviceProviderProvisioningState value. + * Set the ServiceProviderProvisioningState state of the resource. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned', and 'Deprovisioning'. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'. * * @param serviceProviderProvisioningState the serviceProviderProvisioningState value to set * @return the ExpressRouteCircuitInner object itself. @@ -179,7 +187,7 @@ public ExpressRouteCircuitInner withServiceProviderProvisioningState(ServiceProv } /** - * Get the authorizations value. + * Get the list of authorizations. * * @return the authorizations value */ @@ -188,7 +196,7 @@ public List authorizations() { } /** - * Set the authorizations value. + * Set the list of authorizations. * * @param authorizations the authorizations value to set * @return the ExpressRouteCircuitInner object itself. @@ -199,7 +207,7 @@ public ExpressRouteCircuitInner withAuthorizations(List peerings() { } /** - * Set the peerings value. + * Set the list of peerings. * * @param peerings the peerings value to set * @return the ExpressRouteCircuitInner object itself. @@ -219,7 +227,7 @@ public ExpressRouteCircuitInner withPeerings(List connections; + /** * Gets name of the resource that is unique within a resource group. This * name can be used to access the resource. @@ -141,47 +147,47 @@ public class ExpressRouteCircuitPeeringInner extends SubResource { private String etag; /** - * Get the peeringType value. + * Get the peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'. * * @return the peeringType value */ - public ExpressRouteCircuitPeeringType peeringType() { + public ExpressRoutePeeringType peeringType() { return this.peeringType; } /** - * Set the peeringType value. + * Set the peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'. * * @param peeringType the peeringType value to set * @return the ExpressRouteCircuitPeeringInner object itself. */ - public ExpressRouteCircuitPeeringInner withPeeringType(ExpressRouteCircuitPeeringType peeringType) { + public ExpressRouteCircuitPeeringInner withPeeringType(ExpressRoutePeeringType peeringType) { this.peeringType = peeringType; return this; } /** - * Get the state value. + * Get the peering state. Possible values include: 'Disabled', 'Enabled'. * * @return the state value */ - public ExpressRouteCircuitPeeringState state() { + public ExpressRoutePeeringState state() { return this.state; } /** - * Set the state value. + * Set the peering state. Possible values include: 'Disabled', 'Enabled'. * * @param state the state value to set * @return the ExpressRouteCircuitPeeringInner object itself. */ - public ExpressRouteCircuitPeeringInner withState(ExpressRouteCircuitPeeringState state) { + public ExpressRouteCircuitPeeringInner withState(ExpressRoutePeeringState state) { this.state = state; return this; } /** - * Get the azureASN value. + * Get the Azure ASN. * * @return the azureASN value */ @@ -190,7 +196,7 @@ public Integer azureASN() { } /** - * Set the azureASN value. + * Set the Azure ASN. * * @param azureASN the azureASN value to set * @return the ExpressRouteCircuitPeeringInner object itself. @@ -201,27 +207,27 @@ public ExpressRouteCircuitPeeringInner withAzureASN(Integer azureASN) { } /** - * Get the peerASN value. + * Get the peer ASN. * * @return the peerASN value */ - public Integer peerASN() { + public Long peerASN() { return this.peerASN; } /** - * Set the peerASN value. + * Set the peer ASN. * * @param peerASN the peerASN value to set * @return the ExpressRouteCircuitPeeringInner object itself. */ - public ExpressRouteCircuitPeeringInner withPeerASN(Integer peerASN) { + public ExpressRouteCircuitPeeringInner withPeerASN(Long peerASN) { this.peerASN = peerASN; return this; } /** - * Get the primaryPeerAddressPrefix value. + * Get the primary address prefix. * * @return the primaryPeerAddressPrefix value */ @@ -230,7 +236,7 @@ public String primaryPeerAddressPrefix() { } /** - * Set the primaryPeerAddressPrefix value. + * Set the primary address prefix. * * @param primaryPeerAddressPrefix the primaryPeerAddressPrefix value to set * @return the ExpressRouteCircuitPeeringInner object itself. @@ -241,7 +247,7 @@ public ExpressRouteCircuitPeeringInner withPrimaryPeerAddressPrefix(String prima } /** - * Get the secondaryPeerAddressPrefix value. + * Get the secondary address prefix. * * @return the secondaryPeerAddressPrefix value */ @@ -250,7 +256,7 @@ public String secondaryPeerAddressPrefix() { } /** - * Set the secondaryPeerAddressPrefix value. + * Set the secondary address prefix. * * @param secondaryPeerAddressPrefix the secondaryPeerAddressPrefix value to set * @return the ExpressRouteCircuitPeeringInner object itself. @@ -261,7 +267,7 @@ public ExpressRouteCircuitPeeringInner withSecondaryPeerAddressPrefix(String sec } /** - * Get the primaryAzurePort value. + * Get the primary port. * * @return the primaryAzurePort value */ @@ -270,7 +276,7 @@ public String primaryAzurePort() { } /** - * Set the primaryAzurePort value. + * Set the primary port. * * @param primaryAzurePort the primaryAzurePort value to set * @return the ExpressRouteCircuitPeeringInner object itself. @@ -281,7 +287,7 @@ public ExpressRouteCircuitPeeringInner withPrimaryAzurePort(String primaryAzureP } /** - * Get the secondaryAzurePort value. + * Get the secondary port. * * @return the secondaryAzurePort value */ @@ -290,7 +296,7 @@ public String secondaryAzurePort() { } /** - * Set the secondaryAzurePort value. + * Set the secondary port. * * @param secondaryAzurePort the secondaryAzurePort value to set * @return the ExpressRouteCircuitPeeringInner object itself. @@ -301,7 +307,7 @@ public ExpressRouteCircuitPeeringInner withSecondaryAzurePort(String secondaryAz } /** - * Get the sharedKey value. + * Get the shared key. * * @return the sharedKey value */ @@ -310,7 +316,7 @@ public String sharedKey() { } /** - * Set the sharedKey value. + * Set the shared key. * * @param sharedKey the sharedKey value to set * @return the ExpressRouteCircuitPeeringInner object itself. @@ -321,7 +327,7 @@ public ExpressRouteCircuitPeeringInner withSharedKey(String sharedKey) { } /** - * Get the vlanId value. + * Get the VLAN ID. * * @return the vlanId value */ @@ -330,7 +336,7 @@ public Integer vlanId() { } /** - * Set the vlanId value. + * Set the VLAN ID. * * @param vlanId the vlanId value to set * @return the ExpressRouteCircuitPeeringInner object itself. @@ -341,7 +347,7 @@ public ExpressRouteCircuitPeeringInner withVlanId(Integer vlanId) { } /** - * Get the microsoftPeeringConfig value. + * Get the Microsoft peering configuration. * * @return the microsoftPeeringConfig value */ @@ -350,7 +356,7 @@ public ExpressRouteCircuitPeeringConfig microsoftPeeringConfig() { } /** - * Set the microsoftPeeringConfig value. + * Set the Microsoft peering configuration. * * @param microsoftPeeringConfig the microsoftPeeringConfig value to set * @return the ExpressRouteCircuitPeeringInner object itself. @@ -361,7 +367,7 @@ public ExpressRouteCircuitPeeringInner withMicrosoftPeeringConfig(ExpressRouteCi } /** - * Get the stats value. + * Get gets peering stats. * * @return the stats value */ @@ -370,7 +376,7 @@ public ExpressRouteCircuitStatsInner stats() { } /** - * Set the stats value. + * Set gets peering stats. * * @param stats the stats value to set * @return the ExpressRouteCircuitPeeringInner object itself. @@ -381,7 +387,7 @@ public ExpressRouteCircuitPeeringInner withStats(ExpressRouteCircuitStatsInner s } /** - * Get the provisioningState value. + * Get gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. * * @return the provisioningState value */ @@ -390,7 +396,7 @@ public String provisioningState() { } /** - * Set the provisioningState value. + * Set gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. * * @param provisioningState the provisioningState value to set * @return the ExpressRouteCircuitPeeringInner object itself. @@ -401,7 +407,7 @@ public ExpressRouteCircuitPeeringInner withProvisioningState(String provisioning } /** - * Get the gatewayManagerEtag value. + * Get the GatewayManager Etag. * * @return the gatewayManagerEtag value */ @@ -410,7 +416,7 @@ public String gatewayManagerEtag() { } /** - * Set the gatewayManagerEtag value. + * Set the GatewayManager Etag. * * @param gatewayManagerEtag the gatewayManagerEtag value to set * @return the ExpressRouteCircuitPeeringInner object itself. @@ -421,7 +427,7 @@ public ExpressRouteCircuitPeeringInner withGatewayManagerEtag(String gatewayMana } /** - * Get the lastModifiedBy value. + * Get gets whether the provider or the customer last modified the peering. * * @return the lastModifiedBy value */ @@ -430,7 +436,7 @@ public String lastModifiedBy() { } /** - * Set the lastModifiedBy value. + * Set gets whether the provider or the customer last modified the peering. * * @param lastModifiedBy the lastModifiedBy value to set * @return the ExpressRouteCircuitPeeringInner object itself. @@ -441,7 +447,7 @@ public ExpressRouteCircuitPeeringInner withLastModifiedBy(String lastModifiedBy) } /** - * Get the routeFilter value. + * Get the reference of the RouteFilter resource. * * @return the routeFilter value */ @@ -450,7 +456,7 @@ public RouteFilterInner routeFilter() { } /** - * Set the routeFilter value. + * Set the reference of the RouteFilter resource. * * @param routeFilter the routeFilter value to set * @return the ExpressRouteCircuitPeeringInner object itself. @@ -461,7 +467,7 @@ public ExpressRouteCircuitPeeringInner withRouteFilter(RouteFilterInner routeFil } /** - * Get the ipv6PeeringConfig value. + * Get the IPv6 peering configuration. * * @return the ipv6PeeringConfig value */ @@ -470,7 +476,7 @@ public Ipv6ExpressRouteCircuitPeeringConfig ipv6PeeringConfig() { } /** - * Set the ipv6PeeringConfig value. + * Set the IPv6 peering configuration. * * @param ipv6PeeringConfig the ipv6PeeringConfig value to set * @return the ExpressRouteCircuitPeeringInner object itself. @@ -481,7 +487,27 @@ public ExpressRouteCircuitPeeringInner withIpv6PeeringConfig(Ipv6ExpressRouteCir } /** - * Get the name value. + * Get the list of circuit connections associated with Azure Private Peering for this circuit. + * + * @return the connections value + */ + public List connections() { + return this.connections; + } + + /** + * Set the list of circuit connections associated with Azure Private Peering for this circuit. + * + * @param connections the connections value to set + * @return the ExpressRouteCircuitPeeringInner object itself. + */ + public ExpressRouteCircuitPeeringInner withConnections(List connections) { + this.connections = connections; + return this; + } + + /** + * Get gets name of the resource that is unique within a resource group. This name can be used to access the resource. * * @return the name value */ @@ -490,7 +516,7 @@ public String name() { } /** - * Set the name value. + * Set gets name of the resource that is unique within a resource group. This name can be used to access the resource. * * @param name the name value to set * @return the ExpressRouteCircuitPeeringInner object itself. @@ -501,7 +527,7 @@ public ExpressRouteCircuitPeeringInner withName(String name) { } /** - * Get the etag value. + * Get a unique read-only string that changes whenever the resource is updated. * * @return the etag value */ diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitPeeringsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitPeeringsInner.java index 61438136da2..303fa7e0dae 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitPeeringsInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitPeeringsInner.java @@ -159,7 +159,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.delete(resourceGroupName, circuitName, peeringName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -232,7 +232,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, circuitName, peeringName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -325,7 +325,7 @@ public Observable> getWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.get(resourceGroupName, circuitName, peeringName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -424,7 +424,7 @@ public Observable> createOrUpda throw new IllegalArgumentException("Parameter peeringParameters is required and cannot be null."); } Validator.validate(peeringParameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.createOrUpdate(resourceGroupName, circuitName, peeringName, this.client.subscriptionId(), peeringParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -506,7 +506,7 @@ public Observable> beginCreateO throw new IllegalArgumentException("Parameter peeringParameters is required and cannot be null."); } Validator.validate(peeringParameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, circuitName, peeringName, this.client.subscriptionId(), peeringParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -628,7 +628,7 @@ public Observable>> listSi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(resourceGroupName, circuitName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitStatsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitStatsInner.java index dd1c2f6841a..fa42575cee6 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitStatsInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitStatsInner.java @@ -39,7 +39,7 @@ public class ExpressRouteCircuitStatsInner { private Long secondarybytesOut; /** - * Get the primarybytesIn value. + * Get gets BytesIn of the peering. * * @return the primarybytesIn value */ @@ -48,7 +48,7 @@ public Long primarybytesIn() { } /** - * Set the primarybytesIn value. + * Set gets BytesIn of the peering. * * @param primarybytesIn the primarybytesIn value to set * @return the ExpressRouteCircuitStatsInner object itself. @@ -59,7 +59,7 @@ public ExpressRouteCircuitStatsInner withPrimarybytesIn(Long primarybytesIn) { } /** - * Get the primarybytesOut value. + * Get gets BytesOut of the peering. * * @return the primarybytesOut value */ @@ -68,7 +68,7 @@ public Long primarybytesOut() { } /** - * Set the primarybytesOut value. + * Set gets BytesOut of the peering. * * @param primarybytesOut the primarybytesOut value to set * @return the ExpressRouteCircuitStatsInner object itself. @@ -79,7 +79,7 @@ public ExpressRouteCircuitStatsInner withPrimarybytesOut(Long primarybytesOut) { } /** - * Get the secondarybytesIn value. + * Get gets BytesIn of the peering. * * @return the secondarybytesIn value */ @@ -88,7 +88,7 @@ public Long secondarybytesIn() { } /** - * Set the secondarybytesIn value. + * Set gets BytesIn of the peering. * * @param secondarybytesIn the secondarybytesIn value to set * @return the ExpressRouteCircuitStatsInner object itself. @@ -99,7 +99,7 @@ public ExpressRouteCircuitStatsInner withSecondarybytesIn(Long secondarybytesIn) } /** - * Get the secondarybytesOut value. + * Get gets BytesOut of the peering. * * @return the secondarybytesOut value */ @@ -108,7 +108,7 @@ public Long secondarybytesOut() { } /** - * Set the secondarybytesOut value. + * Set gets BytesOut of the peering. * * @param secondarybytesOut the secondarybytesOut value to set * @return the ExpressRouteCircuitStatsInner object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitsArpTableListResultInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitsArpTableListResultInner.java index 5a45f111924..85fe86231a2 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitsArpTableListResultInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitsArpTableListResultInner.java @@ -29,7 +29,7 @@ public class ExpressRouteCircuitsArpTableListResultInner { private String nextLink; /** - * Get the value value. + * Get gets list of the ARP table. * * @return the value value */ @@ -38,7 +38,7 @@ public List value() { } /** - * Set the value value. + * Set gets list of the ARP table. * * @param value the value value to set * @return the ExpressRouteCircuitsArpTableListResultInner object itself. @@ -49,7 +49,7 @@ public ExpressRouteCircuitsArpTableListResultInner withValue(List> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @Path("subscriptionId") String subscriptionId, @Body ExpressRouteCircuitInner 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.network.ExpressRouteCircuits updateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}") + Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.ExpressRouteCircuits beginUpdateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}") + Observable> beginUpdateTags(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.ExpressRouteCircuits listArpTable" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/arpTables/{devicePath}") Observable> listArpTable(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @Path("peeringName") String peeringName, @Path("devicePath") String devicePath, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -196,7 +207,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.delete(resourceGroupName, circuitName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -262,7 +273,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, circuitName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -279,9 +290,9 @@ public Observable> call(Response response) { private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -348,7 +359,7 @@ public Observable> getByResourceGroupW if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.getByResourceGroup(resourceGroupName, circuitName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -440,7 +451,7 @@ public Observable> createOrUpdateWithS throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.createOrUpdate(resourceGroupName, circuitName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -515,7 +526,7 @@ public Observable> beginCreateOrUpdate throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, circuitName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -532,7 +543,321 @@ public Observable> call(Response beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates an express route circuit tags. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the circuit. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ExpressRouteCircuitInner object if successful. + */ + public ExpressRouteCircuitInner updateTags(String resourceGroupName, String circuitName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, circuitName).toBlocking().last().body(); + } + + /** + * Updates an express route circuit tags. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the circuit. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateTagsAsync(String resourceGroupName, String circuitName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, circuitName), serviceCallback); + } + + /** + * Updates an express route circuit tags. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the circuit. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateTagsAsync(String resourceGroupName, String circuitName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, circuitName).map(new Func1, ExpressRouteCircuitInner>() { + @Override + public ExpressRouteCircuitInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates an express route circuit tags. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the circuit. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String circuitName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (circuitName == null) { + throw new IllegalArgumentException("Parameter circuitName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + Observable> observable = service.updateTags(resourceGroupName, circuitName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Updates an express route circuit tags. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the circuit. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ExpressRouteCircuitInner object if successful. + */ + public ExpressRouteCircuitInner updateTags(String resourceGroupName, String circuitName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, circuitName, tags).toBlocking().last().body(); + } + + /** + * Updates an express route circuit tags. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the circuit. + * @param tags Resource tags. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateTagsAsync(String resourceGroupName, String circuitName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, circuitName, tags), serviceCallback); + } + + /** + * Updates an express route circuit tags. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the circuit. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateTagsAsync(String resourceGroupName, String circuitName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, circuitName, tags).map(new Func1, ExpressRouteCircuitInner>() { + @Override + public ExpressRouteCircuitInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates an express route circuit tags. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the circuit. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String circuitName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (circuitName == null) { + throw new IllegalArgumentException("Parameter circuitName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + Observable> observable = service.updateTags(resourceGroupName, circuitName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Updates an express route circuit tags. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the circuit. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ExpressRouteCircuitInner object if successful. + */ + public ExpressRouteCircuitInner beginUpdateTags(String resourceGroupName, String circuitName) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, circuitName).toBlocking().single().body(); + } + + /** + * Updates an express route circuit tags. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the circuit. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateTagsAsync(String resourceGroupName, String circuitName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, circuitName), serviceCallback); + } + + /** + * Updates an express route circuit tags. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the circuit. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCircuitInner object + */ + public Observable beginUpdateTagsAsync(String resourceGroupName, String circuitName) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, circuitName).map(new Func1, ExpressRouteCircuitInner>() { + @Override + public ExpressRouteCircuitInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates an express route circuit tags. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the circuit. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCircuitInner object + */ + public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String circuitName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (circuitName == null) { + throw new IllegalArgumentException("Parameter circuitName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.beginUpdateTags(resourceGroupName, circuitName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates an express route circuit tags. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the circuit. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ExpressRouteCircuitInner object if successful. + */ + public ExpressRouteCircuitInner beginUpdateTags(String resourceGroupName, String circuitName, Map tags) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, circuitName, tags).toBlocking().single().body(); + } + + /** + * Updates an express route circuit tags. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the circuit. + * @param tags Resource tags. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateTagsAsync(String resourceGroupName, String circuitName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, circuitName, tags), serviceCallback); + } + + /** + * Updates an express route circuit tags. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the circuit. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCircuitInner object + */ + public Observable beginUpdateTagsAsync(String resourceGroupName, String circuitName, Map tags) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, circuitName, tags).map(new Func1, ExpressRouteCircuitInner>() { + @Override + public ExpressRouteCircuitInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates an express route circuit tags. + * + * @param resourceGroupName The name of the resource group. + * @param circuitName The name of the circuit. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCircuitInner object + */ + public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String circuitName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (circuitName == null) { + throw new IllegalArgumentException("Parameter circuitName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.beginUpdateTags(resourceGroupName, circuitName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateTagsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -614,7 +939,7 @@ public Observable> if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.listArpTable(resourceGroupName, circuitName, peeringName, devicePath, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -695,7 +1020,7 @@ public Observable> if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginListArpTable(resourceGroupName, circuitName, peeringName, devicePath, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -794,7 +1119,7 @@ public Observable> observable = service.listRoutesTable(resourceGroupName, circuitName, peeringName, devicePath, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -875,7 +1200,7 @@ public Observable, Observable>>() { @Override @@ -974,7 +1299,7 @@ public Observable> observable = service.listRoutesTableSummary(resourceGroupName, circuitName, peeringName, devicePath, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -1055,7 +1380,7 @@ public Observable, Observable>>() { @Override @@ -1140,7 +1465,7 @@ public Observable> getStatsWithSe if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.getStats(resourceGroupName, circuitName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1231,7 +1556,7 @@ public Observable> getPeeringStat if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.getPeeringStats(resourceGroupName, circuitName, peeringName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1344,7 +1669,7 @@ public Observable>> listByResourc if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -1449,7 +1774,7 @@ public Observable>> listSinglePag if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitsRoutesTableListResultInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitsRoutesTableListResultInner.java index 79b6219f218..6104a9570f1 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitsRoutesTableListResultInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitsRoutesTableListResultInner.java @@ -29,7 +29,7 @@ public class ExpressRouteCircuitsRoutesTableListResultInner { private String nextLink; /** - * Get the value value. + * Get the list of routes table. * * @return the value value */ @@ -38,7 +38,7 @@ public List value() { } /** - * Set the value value. + * Set the list of routes table. * * @param value the value value to set * @return the ExpressRouteCircuitsRoutesTableListResultInner object itself. @@ -49,7 +49,7 @@ public ExpressRouteCircuitsRoutesTableListResultInner withValue(List value() { } /** - * Set the value value. + * Set a list of the routes table. * * @param value the value value to set * @return the ExpressRouteCircuitsRoutesTableSummaryListResultInner object itself. @@ -49,7 +49,7 @@ public ExpressRouteCircuitsRoutesTableSummaryListResultInner withValue(List peerings; + + /** + * Gets a unique read-only string that changes whenever the resource is + * updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get the name of the primary port. + * + * @return the primaryAzurePort value + */ + public String primaryAzurePort() { + return this.primaryAzurePort; + } + + /** + * Get the name of the secondary port. + * + * @return the secondaryAzurePort value + */ + public String secondaryAzurePort() { + return this.secondaryAzurePort; + } + + /** + * Get the identifier of the circuit traffic. + * + * @return the sTag value + */ + public Integer sTag() { + return this.sTag; + } + + /** + * Get the peering location of the ExpressRoute circuit. + * + * @return the peeringLocation value + */ + public String peeringLocation() { + return this.peeringLocation; + } + + /** + * Set the peering location of the ExpressRoute circuit. + * + * @param peeringLocation the peeringLocation value to set + * @return the ExpressRouteCrossConnectionInner object itself. + */ + public ExpressRouteCrossConnectionInner withPeeringLocation(String peeringLocation) { + this.peeringLocation = peeringLocation; + return this; + } + + /** + * Get the circuit bandwidth In Mbps. + * + * @return the bandwidthInMbps value + */ + public Integer bandwidthInMbps() { + return this.bandwidthInMbps; + } + + /** + * Set the circuit bandwidth In Mbps. + * + * @param bandwidthInMbps the bandwidthInMbps value to set + * @return the ExpressRouteCrossConnectionInner object itself. + */ + public ExpressRouteCrossConnectionInner withBandwidthInMbps(Integer bandwidthInMbps) { + this.bandwidthInMbps = bandwidthInMbps; + return this; + } + + /** + * Get the ExpressRouteCircuit. + * + * @return the expressRouteCircuit value + */ + public ExpressRouteCircuitReference expressRouteCircuit() { + return this.expressRouteCircuit; + } + + /** + * Set the ExpressRouteCircuit. + * + * @param expressRouteCircuit the expressRouteCircuit value to set + * @return the ExpressRouteCrossConnectionInner object itself. + */ + public ExpressRouteCrossConnectionInner withExpressRouteCircuit(ExpressRouteCircuitReference expressRouteCircuit) { + this.expressRouteCircuit = expressRouteCircuit; + return this; + } + + /** + * Get the provisioning state of the circuit in the connectivity provider system. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned'. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'. + * + * @return the serviceProviderProvisioningState value + */ + public ServiceProviderProvisioningState serviceProviderProvisioningState() { + return this.serviceProviderProvisioningState; + } + + /** + * Set the provisioning state of the circuit in the connectivity provider system. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned'. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'. + * + * @param serviceProviderProvisioningState the serviceProviderProvisioningState value to set + * @return the ExpressRouteCrossConnectionInner object itself. + */ + public ExpressRouteCrossConnectionInner withServiceProviderProvisioningState(ServiceProviderProvisioningState serviceProviderProvisioningState) { + this.serviceProviderProvisioningState = serviceProviderProvisioningState; + return this; + } + + /** + * Get additional read only notes set by the connectivity provider. + * + * @return the serviceProviderNotes value + */ + public String serviceProviderNotes() { + return this.serviceProviderNotes; + } + + /** + * Set additional read only notes set by the connectivity provider. + * + * @param serviceProviderNotes the serviceProviderNotes value to set + * @return the ExpressRouteCrossConnectionInner object itself. + */ + public ExpressRouteCrossConnectionInner withServiceProviderNotes(String serviceProviderNotes) { + this.serviceProviderNotes = serviceProviderNotes; + return this; + } + + /** + * Get gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. + * + * @return the provisioningState value + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the list of peerings. + * + * @return the peerings value + */ + public List peerings() { + return this.peerings; + } + + /** + * Set the list of peerings. + * + * @param peerings the peerings value to set + * @return the ExpressRouteCrossConnectionInner object itself. + */ + public ExpressRouteCrossConnectionInner withPeerings(List peerings) { + this.peerings = peerings; + return this; + } + + /** + * Get gets a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the ExpressRouteCrossConnectionInner object itself. + */ + public ExpressRouteCrossConnectionInner withId(String id) { + this.id = id; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionPeeringInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionPeeringInner.java new file mode 100644 index 00000000000..78cb2cb6bbb --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionPeeringInner.java @@ -0,0 +1,414 @@ +/** + * 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.network.implementation; + +import com.microsoft.azure.management.network.ExpressRoutePeeringType; +import com.microsoft.azure.management.network.ExpressRoutePeeringState; +import com.microsoft.azure.management.network.ExpressRouteCircuitPeeringConfig; +import com.microsoft.azure.management.network.Ipv6ExpressRouteCircuitPeeringConfig; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * Peering in an ExpressRoute Cross Connection resource. + */ +@JsonFlatten +public class ExpressRouteCrossConnectionPeeringInner extends SubResource { + /** + * The peering type. Possible values include: 'AzurePublicPeering', + * 'AzurePrivatePeering', 'MicrosoftPeering'. + */ + @JsonProperty(value = "properties.peeringType") + private ExpressRoutePeeringType peeringType; + + /** + * The peering state. Possible values include: 'Disabled', 'Enabled'. + */ + @JsonProperty(value = "properties.state") + private ExpressRoutePeeringState state; + + /** + * The Azure ASN. + */ + @JsonProperty(value = "properties.azureASN", access = JsonProperty.Access.WRITE_ONLY) + private Integer azureASN; + + /** + * The peer ASN. + */ + @JsonProperty(value = "properties.peerASN") + private Long peerASN; + + /** + * The primary address prefix. + */ + @JsonProperty(value = "properties.primaryPeerAddressPrefix") + private String primaryPeerAddressPrefix; + + /** + * The secondary address prefix. + */ + @JsonProperty(value = "properties.secondaryPeerAddressPrefix") + private String secondaryPeerAddressPrefix; + + /** + * The primary port. + */ + @JsonProperty(value = "properties.primaryAzurePort", access = JsonProperty.Access.WRITE_ONLY) + private String primaryAzurePort; + + /** + * The secondary port. + */ + @JsonProperty(value = "properties.secondaryAzurePort", access = JsonProperty.Access.WRITE_ONLY) + private String secondaryAzurePort; + + /** + * The shared key. + */ + @JsonProperty(value = "properties.sharedKey") + private String sharedKey; + + /** + * The VLAN ID. + */ + @JsonProperty(value = "properties.vlanId") + private Integer vlanId; + + /** + * The Microsoft peering configuration. + */ + @JsonProperty(value = "properties.microsoftPeeringConfig") + private ExpressRouteCircuitPeeringConfig microsoftPeeringConfig; + + /** + * Gets the provisioning state of the public IP resource. Possible values + * are: 'Updating', 'Deleting', and 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /** + * The GatewayManager Etag. + */ + @JsonProperty(value = "properties.gatewayManagerEtag") + private String gatewayManagerEtag; + + /** + * Gets whether the provider or the customer last modified the peering. + */ + @JsonProperty(value = "properties.lastModifiedBy") + private String lastModifiedBy; + + /** + * The IPv6 peering configuration. + */ + @JsonProperty(value = "properties.ipv6PeeringConfig") + private Ipv6ExpressRouteCircuitPeeringConfig ipv6PeeringConfig; + + /** + * Gets name of the resource that is unique within a resource group. This + * name can be used to access the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Get the peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'. + * + * @return the peeringType value + */ + public ExpressRoutePeeringType peeringType() { + return this.peeringType; + } + + /** + * Set the peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'. + * + * @param peeringType the peeringType value to set + * @return the ExpressRouteCrossConnectionPeeringInner object itself. + */ + public ExpressRouteCrossConnectionPeeringInner withPeeringType(ExpressRoutePeeringType peeringType) { + this.peeringType = peeringType; + return this; + } + + /** + * Get the peering state. Possible values include: 'Disabled', 'Enabled'. + * + * @return the state value + */ + public ExpressRoutePeeringState state() { + return this.state; + } + + /** + * Set the peering state. Possible values include: 'Disabled', 'Enabled'. + * + * @param state the state value to set + * @return the ExpressRouteCrossConnectionPeeringInner object itself. + */ + public ExpressRouteCrossConnectionPeeringInner withState(ExpressRoutePeeringState state) { + this.state = state; + return this; + } + + /** + * Get the Azure ASN. + * + * @return the azureASN value + */ + public Integer azureASN() { + return this.azureASN; + } + + /** + * Get the peer ASN. + * + * @return the peerASN value + */ + public Long peerASN() { + return this.peerASN; + } + + /** + * Set the peer ASN. + * + * @param peerASN the peerASN value to set + * @return the ExpressRouteCrossConnectionPeeringInner object itself. + */ + public ExpressRouteCrossConnectionPeeringInner withPeerASN(Long peerASN) { + this.peerASN = peerASN; + return this; + } + + /** + * Get the primary address prefix. + * + * @return the primaryPeerAddressPrefix value + */ + public String primaryPeerAddressPrefix() { + return this.primaryPeerAddressPrefix; + } + + /** + * Set the primary address prefix. + * + * @param primaryPeerAddressPrefix the primaryPeerAddressPrefix value to set + * @return the ExpressRouteCrossConnectionPeeringInner object itself. + */ + public ExpressRouteCrossConnectionPeeringInner withPrimaryPeerAddressPrefix(String primaryPeerAddressPrefix) { + this.primaryPeerAddressPrefix = primaryPeerAddressPrefix; + return this; + } + + /** + * Get the secondary address prefix. + * + * @return the secondaryPeerAddressPrefix value + */ + public String secondaryPeerAddressPrefix() { + return this.secondaryPeerAddressPrefix; + } + + /** + * Set the secondary address prefix. + * + * @param secondaryPeerAddressPrefix the secondaryPeerAddressPrefix value to set + * @return the ExpressRouteCrossConnectionPeeringInner object itself. + */ + public ExpressRouteCrossConnectionPeeringInner withSecondaryPeerAddressPrefix(String secondaryPeerAddressPrefix) { + this.secondaryPeerAddressPrefix = secondaryPeerAddressPrefix; + return this; + } + + /** + * Get the primary port. + * + * @return the primaryAzurePort value + */ + public String primaryAzurePort() { + return this.primaryAzurePort; + } + + /** + * Get the secondary port. + * + * @return the secondaryAzurePort value + */ + public String secondaryAzurePort() { + return this.secondaryAzurePort; + } + + /** + * Get the shared key. + * + * @return the sharedKey value + */ + public String sharedKey() { + return this.sharedKey; + } + + /** + * Set the shared key. + * + * @param sharedKey the sharedKey value to set + * @return the ExpressRouteCrossConnectionPeeringInner object itself. + */ + public ExpressRouteCrossConnectionPeeringInner withSharedKey(String sharedKey) { + this.sharedKey = sharedKey; + return this; + } + + /** + * Get the VLAN ID. + * + * @return the vlanId value + */ + public Integer vlanId() { + return this.vlanId; + } + + /** + * Set the VLAN ID. + * + * @param vlanId the vlanId value to set + * @return the ExpressRouteCrossConnectionPeeringInner object itself. + */ + public ExpressRouteCrossConnectionPeeringInner withVlanId(Integer vlanId) { + this.vlanId = vlanId; + return this; + } + + /** + * Get the Microsoft peering configuration. + * + * @return the microsoftPeeringConfig value + */ + public ExpressRouteCircuitPeeringConfig microsoftPeeringConfig() { + return this.microsoftPeeringConfig; + } + + /** + * Set the Microsoft peering configuration. + * + * @param microsoftPeeringConfig the microsoftPeeringConfig value to set + * @return the ExpressRouteCrossConnectionPeeringInner object itself. + */ + public ExpressRouteCrossConnectionPeeringInner withMicrosoftPeeringConfig(ExpressRouteCircuitPeeringConfig microsoftPeeringConfig) { + this.microsoftPeeringConfig = microsoftPeeringConfig; + return this; + } + + /** + * Get gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. + * + * @return the provisioningState value + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the GatewayManager Etag. + * + * @return the gatewayManagerEtag value + */ + public String gatewayManagerEtag() { + return this.gatewayManagerEtag; + } + + /** + * Set the GatewayManager Etag. + * + * @param gatewayManagerEtag the gatewayManagerEtag value to set + * @return the ExpressRouteCrossConnectionPeeringInner object itself. + */ + public ExpressRouteCrossConnectionPeeringInner withGatewayManagerEtag(String gatewayManagerEtag) { + this.gatewayManagerEtag = gatewayManagerEtag; + return this; + } + + /** + * Get gets whether the provider or the customer last modified the peering. + * + * @return the lastModifiedBy value + */ + public String lastModifiedBy() { + return this.lastModifiedBy; + } + + /** + * Set gets whether the provider or the customer last modified the peering. + * + * @param lastModifiedBy the lastModifiedBy value to set + * @return the ExpressRouteCrossConnectionPeeringInner object itself. + */ + public ExpressRouteCrossConnectionPeeringInner withLastModifiedBy(String lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + return this; + } + + /** + * Get the IPv6 peering configuration. + * + * @return the ipv6PeeringConfig value + */ + public Ipv6ExpressRouteCircuitPeeringConfig ipv6PeeringConfig() { + return this.ipv6PeeringConfig; + } + + /** + * Set the IPv6 peering configuration. + * + * @param ipv6PeeringConfig the ipv6PeeringConfig value to set + * @return the ExpressRouteCrossConnectionPeeringInner object itself. + */ + public ExpressRouteCrossConnectionPeeringInner withIpv6PeeringConfig(Ipv6ExpressRouteCircuitPeeringConfig ipv6PeeringConfig) { + this.ipv6PeeringConfig = ipv6PeeringConfig; + return this; + } + + /** + * Get gets name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set gets name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @param name the name value to set + * @return the ExpressRouteCrossConnectionPeeringInner object itself. + */ + public ExpressRouteCrossConnectionPeeringInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionPeeringsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionPeeringsInner.java new file mode 100644 index 00000000000..7a8d3fecc55 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionPeeringsInner.java @@ -0,0 +1,764 @@ +/** + * 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.network.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in ExpressRouteCrossConnectionPeerings. + */ +public class ExpressRouteCrossConnectionPeeringsInner { + /** The Retrofit service to perform REST calls. */ + private ExpressRouteCrossConnectionPeeringsService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of ExpressRouteCrossConnectionPeeringsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ExpressRouteCrossConnectionPeeringsInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(ExpressRouteCrossConnectionPeeringsService.class); + this.client = client; + } + + /** + * The interface defining all the services for ExpressRouteCrossConnectionPeerings to be + * used by Retrofit to perform actually REST calls. + */ + interface ExpressRouteCrossConnectionPeeringsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.ExpressRouteCrossConnectionPeerings list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings") + Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @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.network.ExpressRouteCrossConnectionPeerings delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("peeringName") String peeringName, @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.network.ExpressRouteCrossConnectionPeerings beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("peeringName") String peeringName, @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.network.ExpressRouteCrossConnectionPeerings get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("peeringName") String peeringName, @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.network.ExpressRouteCrossConnectionPeerings createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("peeringName") String peeringName, @Path("subscriptionId") String subscriptionId, @Body ExpressRouteCrossConnectionPeeringInner peeringParameters, @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.network.ExpressRouteCrossConnectionPeerings beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("peeringName") String peeringName, @Path("subscriptionId") String subscriptionId, @Body ExpressRouteCrossConnectionPeeringInner peeringParameters, @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.network.ExpressRouteCrossConnectionPeerings listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets all peerings in a specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ExpressRouteCrossConnectionPeeringInner> object if successful. + */ + public PagedList list(final String resourceGroupName, final String crossConnectionName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, crossConnectionName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all peerings in a specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final String resourceGroupName, final String crossConnectionName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, crossConnectionName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all peerings in a specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExpressRouteCrossConnectionPeeringInner> object + */ + public Observable> listAsync(final String resourceGroupName, final String crossConnectionName) { + return listWithServiceResponseAsync(resourceGroupName, crossConnectionName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all peerings in a specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExpressRouteCrossConnectionPeeringInner> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String crossConnectionName) { + return listSinglePageAsync(resourceGroupName, crossConnectionName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all peerings in a specified ExpressRouteCrossConnection. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ExpressRouteCrossConnectionPeeringInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String crossConnectionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (crossConnectionName == null) { + throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + return service.list(resourceGroupName, crossConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes the specified peering from the ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String crossConnectionName, String peeringName) { + deleteWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName).toBlocking().last().body(); + } + + /** + * Deletes the specified peering from the ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String crossConnectionName, String peeringName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName), serviceCallback); + } + + /** + * Deletes the specified peering from the ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String crossConnectionName, String peeringName) { + return deleteWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified peering from the ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, String peeringName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (crossConnectionName == null) { + throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + Observable> observable = service.delete(resourceGroupName, crossConnectionName, peeringName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified peering from the ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginDelete(String resourceGroupName, String crossConnectionName, String peeringName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName).toBlocking().single().body(); + } + + /** + * Deletes the specified peering from the ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDeleteAsync(String resourceGroupName, String crossConnectionName, String peeringName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName), serviceCallback); + } + + /** + * Deletes the specified peering from the ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String crossConnectionName, String peeringName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified peering from the ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, String peeringName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (crossConnectionName == null) { + throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + return service.beginDelete(resourceGroupName, crossConnectionName, peeringName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the specified peering for the ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ExpressRouteCrossConnectionPeeringInner object if successful. + */ + public ExpressRouteCrossConnectionPeeringInner get(String resourceGroupName, String crossConnectionName, String peeringName) { + return getWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName).toBlocking().single().body(); + } + + /** + * Gets the specified peering for the ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String crossConnectionName, String peeringName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName), serviceCallback); + } + + /** + * Gets the specified peering for the ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCrossConnectionPeeringInner object + */ + public Observable getAsync(String resourceGroupName, String crossConnectionName, String peeringName) { + return getWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName).map(new Func1, ExpressRouteCrossConnectionPeeringInner>() { + @Override + public ExpressRouteCrossConnectionPeeringInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified peering for the ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCrossConnectionPeeringInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, String peeringName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (crossConnectionName == null) { + throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + return service.get(resourceGroupName, crossConnectionName, peeringName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates or updates a peering in the specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param peeringParameters Parameters supplied to the create or update ExpressRouteCrossConnection peering operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ExpressRouteCrossConnectionPeeringInner object if successful. + */ + public ExpressRouteCrossConnectionPeeringInner createOrUpdate(String resourceGroupName, String crossConnectionName, String peeringName, ExpressRouteCrossConnectionPeeringInner peeringParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, peeringParameters).toBlocking().last().body(); + } + + /** + * Creates or updates a peering in the specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param peeringParameters Parameters supplied to the create or update ExpressRouteCrossConnection peering operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String crossConnectionName, String peeringName, ExpressRouteCrossConnectionPeeringInner peeringParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, peeringParameters), serviceCallback); + } + + /** + * Creates or updates a peering in the specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param peeringParameters Parameters supplied to the create or update ExpressRouteCrossConnection peering operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String crossConnectionName, String peeringName, ExpressRouteCrossConnectionPeeringInner peeringParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, peeringParameters).map(new Func1, ExpressRouteCrossConnectionPeeringInner>() { + @Override + public ExpressRouteCrossConnectionPeeringInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a peering in the specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param peeringParameters Parameters supplied to the create or update ExpressRouteCrossConnection peering operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, String peeringName, ExpressRouteCrossConnectionPeeringInner peeringParameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (crossConnectionName == null) { + throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (peeringParameters == null) { + throw new IllegalArgumentException("Parameter peeringParameters is required and cannot be null."); + } + Validator.validate(peeringParameters); + final String apiVersion = "2018-04-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, crossConnectionName, peeringName, this.client.subscriptionId(), peeringParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates a peering in the specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param peeringParameters Parameters supplied to the create or update ExpressRouteCrossConnection peering operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ExpressRouteCrossConnectionPeeringInner object if successful. + */ + public ExpressRouteCrossConnectionPeeringInner beginCreateOrUpdate(String resourceGroupName, String crossConnectionName, String peeringName, ExpressRouteCrossConnectionPeeringInner peeringParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, peeringParameters).toBlocking().single().body(); + } + + /** + * Creates or updates a peering in the specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param peeringParameters Parameters supplied to the create or update ExpressRouteCrossConnection peering operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String crossConnectionName, String peeringName, ExpressRouteCrossConnectionPeeringInner peeringParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, peeringParameters), serviceCallback); + } + + /** + * Creates or updates a peering in the specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param peeringParameters Parameters supplied to the create or update ExpressRouteCrossConnection peering operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCrossConnectionPeeringInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String crossConnectionName, String peeringName, ExpressRouteCrossConnectionPeeringInner peeringParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, peeringParameters).map(new Func1, ExpressRouteCrossConnectionPeeringInner>() { + @Override + public ExpressRouteCrossConnectionPeeringInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a peering in the specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param peeringParameters Parameters supplied to the create or update ExpressRouteCrossConnection peering operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCrossConnectionPeeringInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, String peeringName, ExpressRouteCrossConnectionPeeringInner peeringParameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (crossConnectionName == null) { + throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (peeringParameters == null) { + throw new IllegalArgumentException("Parameter peeringParameters is required and cannot be null."); + } + Validator.validate(peeringParameters); + final String apiVersion = "2018-04-01"; + return service.beginCreateOrUpdate(resourceGroupName, crossConnectionName, peeringName, this.client.subscriptionId(), peeringParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets all peerings in a specified ExpressRouteCrossConnection. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ExpressRouteCrossConnectionPeeringInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all peerings in a specified ExpressRouteCrossConnection. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all peerings in a specified ExpressRouteCrossConnection. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExpressRouteCrossConnectionPeeringInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all peerings in a specified ExpressRouteCrossConnection. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExpressRouteCrossConnectionPeeringInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all peerings in a specified ExpressRouteCrossConnection. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ExpressRouteCrossConnectionPeeringInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionsInner.java new file mode 100644 index 00000000000..3a90e9302aa --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionsInner.java @@ -0,0 +1,1676 @@ +/** + * 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.network.implementation; + +import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet; +import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsListing; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.network.TagsObject; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import java.util.Map; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.PATCH; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in ExpressRouteCrossConnections. + */ +public class ExpressRouteCrossConnectionsInner implements InnerSupportsGet, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private ExpressRouteCrossConnectionsService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of ExpressRouteCrossConnectionsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ExpressRouteCrossConnectionsInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(ExpressRouteCrossConnectionsService.class); + this.client = client; + } + + /** + * The interface defining all the services for ExpressRouteCrossConnections to be + * used by Retrofit to perform actually REST calls. + */ + interface ExpressRouteCrossConnectionsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.ExpressRouteCrossConnections list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteCrossConnections") + Observable> list(@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.network.ExpressRouteCrossConnections listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @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.network.ExpressRouteCrossConnections getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}") + Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @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.network.ExpressRouteCrossConnections createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("subscriptionId") String subscriptionId, @Body ExpressRouteCrossConnectionInner 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.network.ExpressRouteCrossConnections beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("subscriptionId") String subscriptionId, @Body ExpressRouteCrossConnectionInner 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.network.ExpressRouteCrossConnections updateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}") + Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject crossConnectionParameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.ExpressRouteCrossConnections beginUpdateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}") + Observable> beginUpdateTags(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject crossConnectionParameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.ExpressRouteCrossConnections listArpTable" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/arpTables/{devicePath}") + Observable> listArpTable(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("peeringName") String peeringName, @Path("devicePath") String devicePath, @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.network.ExpressRouteCrossConnections beginListArpTable" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/arpTables/{devicePath}") + Observable> beginListArpTable(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("peeringName") String peeringName, @Path("devicePath") String devicePath, @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.network.ExpressRouteCrossConnections listRoutesTableSummary" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTablesSummary/{devicePath}") + Observable> listRoutesTableSummary(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("peeringName") String peeringName, @Path("devicePath") String devicePath, @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.network.ExpressRouteCrossConnections beginListRoutesTableSummary" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTablesSummary/{devicePath}") + Observable> beginListRoutesTableSummary(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("peeringName") String peeringName, @Path("devicePath") String devicePath, @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.network.ExpressRouteCrossConnections listRoutesTable" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTables/{devicePath}") + Observable> listRoutesTable(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("peeringName") String peeringName, @Path("devicePath") String devicePath, @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.network.ExpressRouteCrossConnections beginListRoutesTable" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTables/{devicePath}") + Observable> beginListRoutesTable(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("peeringName") String peeringName, @Path("devicePath") String devicePath, @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.network.ExpressRouteCrossConnections listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @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.network.ExpressRouteCrossConnections listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Retrieves all the ExpressRouteCrossConnections in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ExpressRouteCrossConnectionInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves all the ExpressRouteCrossConnections in a subscription. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves all the ExpressRouteCrossConnections in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExpressRouteCrossConnectionInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves all the ExpressRouteCrossConnections in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExpressRouteCrossConnectionInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieves all the ExpressRouteCrossConnections in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ExpressRouteCrossConnectionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves all the ExpressRouteCrossConnections in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ExpressRouteCrossConnectionInner> object if successful. + */ + public PagedList listByResourceGroup(final String resourceGroupName) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves all the ExpressRouteCrossConnections in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(resourceGroupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves all the ExpressRouteCrossConnections in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExpressRouteCrossConnectionInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves all the ExpressRouteCrossConnections in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExpressRouteCrossConnectionInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { + return listByResourceGroupSinglePageAsync(resourceGroupName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieves all the ExpressRouteCrossConnections in a resource group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ExpressRouteCrossConnectionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets details about the specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group (peering location of the circuit). + * @param crossConnectionName The name of the ExpressRouteCrossConnection (service key of the circuit). + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ExpressRouteCrossConnectionInner object if successful. + */ + public ExpressRouteCrossConnectionInner getByResourceGroup(String resourceGroupName, String crossConnectionName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, crossConnectionName).toBlocking().single().body(); + } + + /** + * Gets details about the specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group (peering location of the circuit). + * @param crossConnectionName The name of the ExpressRouteCrossConnection (service key of the circuit). + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String crossConnectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, crossConnectionName), serviceCallback); + } + + /** + * Gets details about the specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group (peering location of the circuit). + * @param crossConnectionName The name of the ExpressRouteCrossConnection (service key of the circuit). + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCrossConnectionInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String crossConnectionName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, crossConnectionName).map(new Func1, ExpressRouteCrossConnectionInner>() { + @Override + public ExpressRouteCrossConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets details about the specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group (peering location of the circuit). + * @param crossConnectionName The name of the ExpressRouteCrossConnection (service key of the circuit). + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCrossConnectionInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String crossConnectionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (crossConnectionName == null) { + throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + return service.getByResourceGroup(resourceGroupName, crossConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Update the specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param parameters Parameters supplied to the update express route crossConnection operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ExpressRouteCrossConnectionInner object if successful. + */ + public ExpressRouteCrossConnectionInner createOrUpdate(String resourceGroupName, String crossConnectionName, ExpressRouteCrossConnectionInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, parameters).toBlocking().last().body(); + } + + /** + * Update the specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param parameters Parameters supplied to the update express route crossConnection operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String crossConnectionName, ExpressRouteCrossConnectionInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, parameters), serviceCallback); + } + + /** + * Update the specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param parameters Parameters supplied to the update express route crossConnection operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String crossConnectionName, ExpressRouteCrossConnectionInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, parameters).map(new Func1, ExpressRouteCrossConnectionInner>() { + @Override + public ExpressRouteCrossConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update the specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param parameters Parameters supplied to the update express route crossConnection operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, ExpressRouteCrossConnectionInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (crossConnectionName == null) { + throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2018-04-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, crossConnectionName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Update the specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param parameters Parameters supplied to the update express route crossConnection operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ExpressRouteCrossConnectionInner object if successful. + */ + public ExpressRouteCrossConnectionInner beginCreateOrUpdate(String resourceGroupName, String crossConnectionName, ExpressRouteCrossConnectionInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, parameters).toBlocking().single().body(); + } + + /** + * Update the specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param parameters Parameters supplied to the update express route crossConnection operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String crossConnectionName, ExpressRouteCrossConnectionInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, parameters), serviceCallback); + } + + /** + * Update the specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param parameters Parameters supplied to the update express route crossConnection operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCrossConnectionInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String crossConnectionName, ExpressRouteCrossConnectionInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, parameters).map(new Func1, ExpressRouteCrossConnectionInner>() { + @Override + public ExpressRouteCrossConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update the specified ExpressRouteCrossConnection. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param parameters Parameters supplied to the update express route crossConnection operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCrossConnectionInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, ExpressRouteCrossConnectionInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (crossConnectionName == null) { + throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2018-04-01"; + return service.beginCreateOrUpdate(resourceGroupName, crossConnectionName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates an express route cross connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the cross connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ExpressRouteCrossConnectionInner object if successful. + */ + public ExpressRouteCrossConnectionInner updateTags(String resourceGroupName, String crossConnectionName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, crossConnectionName).toBlocking().last().body(); + } + + /** + * Updates an express route cross connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the cross connection. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateTagsAsync(String resourceGroupName, String crossConnectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, crossConnectionName), serviceCallback); + } + + /** + * Updates an express route cross connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the cross connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateTagsAsync(String resourceGroupName, String crossConnectionName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, crossConnectionName).map(new Func1, ExpressRouteCrossConnectionInner>() { + @Override + public ExpressRouteCrossConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates an express route cross connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the cross connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String crossConnectionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (crossConnectionName == null) { + throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject crossConnectionParameters = new TagsObject(); + crossConnectionParameters.withTags(null); + Observable> observable = service.updateTags(resourceGroupName, crossConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), crossConnectionParameters, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Updates an express route cross connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the cross connection. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ExpressRouteCrossConnectionInner object if successful. + */ + public ExpressRouteCrossConnectionInner updateTags(String resourceGroupName, String crossConnectionName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, crossConnectionName, tags).toBlocking().last().body(); + } + + /** + * Updates an express route cross connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the cross connection. + * @param tags Resource tags. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateTagsAsync(String resourceGroupName, String crossConnectionName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, crossConnectionName, tags), serviceCallback); + } + + /** + * Updates an express route cross connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the cross connection. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateTagsAsync(String resourceGroupName, String crossConnectionName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, crossConnectionName, tags).map(new Func1, ExpressRouteCrossConnectionInner>() { + @Override + public ExpressRouteCrossConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates an express route cross connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the cross connection. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (crossConnectionName == null) { + throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject crossConnectionParameters = new TagsObject(); + crossConnectionParameters.withTags(tags); + Observable> observable = service.updateTags(resourceGroupName, crossConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), crossConnectionParameters, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Updates an express route cross connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the cross connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ExpressRouteCrossConnectionInner object if successful. + */ + public ExpressRouteCrossConnectionInner beginUpdateTags(String resourceGroupName, String crossConnectionName) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, crossConnectionName).toBlocking().single().body(); + } + + /** + * Updates an express route cross connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the cross connection. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateTagsAsync(String resourceGroupName, String crossConnectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, crossConnectionName), serviceCallback); + } + + /** + * Updates an express route cross connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the cross connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCrossConnectionInner object + */ + public Observable beginUpdateTagsAsync(String resourceGroupName, String crossConnectionName) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, crossConnectionName).map(new Func1, ExpressRouteCrossConnectionInner>() { + @Override + public ExpressRouteCrossConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates an express route cross connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the cross connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCrossConnectionInner object + */ + public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String crossConnectionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (crossConnectionName == null) { + throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject crossConnectionParameters = new TagsObject(); + crossConnectionParameters.withTags(null); + return service.beginUpdateTags(resourceGroupName, crossConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), crossConnectionParameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates an express route cross connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the cross connection. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ExpressRouteCrossConnectionInner object if successful. + */ + public ExpressRouteCrossConnectionInner beginUpdateTags(String resourceGroupName, String crossConnectionName, Map tags) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, crossConnectionName, tags).toBlocking().single().body(); + } + + /** + * Updates an express route cross connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the cross connection. + * @param tags Resource tags. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateTagsAsync(String resourceGroupName, String crossConnectionName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, crossConnectionName, tags), serviceCallback); + } + + /** + * Updates an express route cross connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the cross connection. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCrossConnectionInner object + */ + public Observable beginUpdateTagsAsync(String resourceGroupName, String crossConnectionName, Map tags) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, crossConnectionName, tags).map(new Func1, ExpressRouteCrossConnectionInner>() { + @Override + public ExpressRouteCrossConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates an express route cross connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the cross connection. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCrossConnectionInner object + */ + public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (crossConnectionName == null) { + throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject crossConnectionParameters = new TagsObject(); + crossConnectionParameters.withTags(tags); + return service.beginUpdateTags(resourceGroupName, crossConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), crossConnectionParameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateTagsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the currently advertised ARP table associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ExpressRouteCircuitsArpTableListResultInner object if successful. + */ + public ExpressRouteCircuitsArpTableListResultInner listArpTable(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { + return listArpTableWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).toBlocking().last().body(); + } + + /** + * Gets the currently advertised ARP table associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listArpTableAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listArpTableWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath), serviceCallback); + } + + /** + * Gets the currently advertised ARP table associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable listArpTableAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { + return listArpTableWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).map(new Func1, ExpressRouteCircuitsArpTableListResultInner>() { + @Override + public ExpressRouteCircuitsArpTableListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the currently advertised ARP table associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> listArpTableWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (crossConnectionName == null) { + throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (devicePath == null) { + throw new IllegalArgumentException("Parameter devicePath is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + Observable> observable = service.listArpTable(resourceGroupName, crossConnectionName, peeringName, devicePath, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Gets the currently advertised ARP table associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ExpressRouteCircuitsArpTableListResultInner object if successful. + */ + public ExpressRouteCircuitsArpTableListResultInner beginListArpTable(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { + return beginListArpTableWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).toBlocking().single().body(); + } + + /** + * Gets the currently advertised ARP table associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginListArpTableAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginListArpTableWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath), serviceCallback); + } + + /** + * Gets the currently advertised ARP table associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCircuitsArpTableListResultInner object + */ + public Observable beginListArpTableAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { + return beginListArpTableWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).map(new Func1, ExpressRouteCircuitsArpTableListResultInner>() { + @Override + public ExpressRouteCircuitsArpTableListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the currently advertised ARP table associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCircuitsArpTableListResultInner object + */ + public Observable> beginListArpTableWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (crossConnectionName == null) { + throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (devicePath == null) { + throw new IllegalArgumentException("Parameter devicePath is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + return service.beginListArpTable(resourceGroupName, crossConnectionName, peeringName, devicePath, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginListArpTableDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginListArpTableDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the route table summary associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner object if successful. + */ + public ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner listRoutesTableSummary(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { + return listRoutesTableSummaryWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).toBlocking().last().body(); + } + + /** + * Gets the route table summary associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listRoutesTableSummaryAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listRoutesTableSummaryWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath), serviceCallback); + } + + /** + * Gets the route table summary associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable listRoutesTableSummaryAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { + return listRoutesTableSummaryWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).map(new Func1, ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner>() { + @Override + public ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the route table summary associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> listRoutesTableSummaryWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (crossConnectionName == null) { + throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (devicePath == null) { + throw new IllegalArgumentException("Parameter devicePath is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + Observable> observable = service.listRoutesTableSummary(resourceGroupName, crossConnectionName, peeringName, devicePath, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Gets the route table summary associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner object if successful. + */ + public ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner beginListRoutesTableSummary(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { + return beginListRoutesTableSummaryWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).toBlocking().single().body(); + } + + /** + * Gets the route table summary associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginListRoutesTableSummaryAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginListRoutesTableSummaryWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath), serviceCallback); + } + + /** + * Gets the route table summary associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner object + */ + public Observable beginListRoutesTableSummaryAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { + return beginListRoutesTableSummaryWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).map(new Func1, ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner>() { + @Override + public ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the route table summary associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner object + */ + public Observable> beginListRoutesTableSummaryWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (crossConnectionName == null) { + throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (devicePath == null) { + throw new IllegalArgumentException("Parameter devicePath is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + return service.beginListRoutesTableSummary(resourceGroupName, crossConnectionName, peeringName, devicePath, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginListRoutesTableSummaryDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginListRoutesTableSummaryDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the currently advertised routes table associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ExpressRouteCircuitsRoutesTableListResultInner object if successful. + */ + public ExpressRouteCircuitsRoutesTableListResultInner listRoutesTable(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { + return listRoutesTableWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).toBlocking().last().body(); + } + + /** + * Gets the currently advertised routes table associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listRoutesTableAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listRoutesTableWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath), serviceCallback); + } + + /** + * Gets the currently advertised routes table associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable listRoutesTableAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { + return listRoutesTableWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).map(new Func1, ExpressRouteCircuitsRoutesTableListResultInner>() { + @Override + public ExpressRouteCircuitsRoutesTableListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the currently advertised routes table associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> listRoutesTableWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (crossConnectionName == null) { + throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (devicePath == null) { + throw new IllegalArgumentException("Parameter devicePath is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + Observable> observable = service.listRoutesTable(resourceGroupName, crossConnectionName, peeringName, devicePath, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Gets the currently advertised routes table associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ExpressRouteCircuitsRoutesTableListResultInner object if successful. + */ + public ExpressRouteCircuitsRoutesTableListResultInner beginListRoutesTable(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { + return beginListRoutesTableWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).toBlocking().single().body(); + } + + /** + * Gets the currently advertised routes table associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginListRoutesTableAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginListRoutesTableWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath), serviceCallback); + } + + /** + * Gets the currently advertised routes table associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCircuitsRoutesTableListResultInner object + */ + public Observable beginListRoutesTableAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { + return beginListRoutesTableWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).map(new Func1, ExpressRouteCircuitsRoutesTableListResultInner>() { + @Override + public ExpressRouteCircuitsRoutesTableListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the currently advertised routes table associated with the express route cross connection in a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param peeringName The name of the peering. + * @param devicePath The path of the device. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteCircuitsRoutesTableListResultInner object + */ + public Observable> beginListRoutesTableWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (crossConnectionName == null) { + throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (devicePath == null) { + throw new IllegalArgumentException("Parameter devicePath is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + return service.beginListRoutesTable(resourceGroupName, crossConnectionName, peeringName, devicePath, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginListRoutesTableDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginListRoutesTableDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves all the ExpressRouteCrossConnections in a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ExpressRouteCrossConnectionInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves all the ExpressRouteCrossConnections in a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves all the ExpressRouteCrossConnections in a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExpressRouteCrossConnectionInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves all the ExpressRouteCrossConnections in a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExpressRouteCrossConnectionInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieves all the ExpressRouteCrossConnections in a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ExpressRouteCrossConnectionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves all the ExpressRouteCrossConnections in a resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ExpressRouteCrossConnectionInner> object if successful. + */ + public PagedList listByResourceGroupNext(final String nextPageLink) { + ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves all the ExpressRouteCrossConnections in a resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves all the ExpressRouteCrossConnections in a resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExpressRouteCrossConnectionInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves all the ExpressRouteCrossConnections in a resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExpressRouteCrossConnectionInner> object + */ + public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieves all the ExpressRouteCrossConnections in a resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ExpressRouteCrossConnectionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner.java new file mode 100644 index 00000000000..1b81208dd81 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner.java @@ -0,0 +1,61 @@ +/** + * 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.network.implementation; + +import java.util.List; +import com.microsoft.azure.management.network.ExpressRouteCrossConnectionRoutesTableSummary; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Response for ListRoutesTable associated with the Express Route Cross + * Connections. + */ +public class ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner { + /** + * A list of the routes table. + */ + @JsonProperty(value = "value") + private List value; + + /** + * The URL to get the next set of results. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Get a list of the routes table. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set a list of the routes table. + * + * @param value the value value to set + * @return the ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner object itself. + */ + public ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the URL to get the next set of results. + * + * @return the nextLink value + */ + public String nextLink() { + return this.nextLink; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteServiceProviderInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteServiceProviderInner.java index 359ad7f3f3e..1bd9c1afc89 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteServiceProviderInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteServiceProviderInner.java @@ -12,12 +12,14 @@ import com.microsoft.azure.management.network.ExpressRouteServiceProviderBandwidthsOffered; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; import com.microsoft.azure.Resource; /** * A ExpressRouteResourceProvider object. */ @JsonFlatten +@SkipParentValidation public class ExpressRouteServiceProviderInner extends Resource { /** * Get a list of peering locations. @@ -38,7 +40,13 @@ public class ExpressRouteServiceProviderInner extends Resource { private String provisioningState; /** - * Get the peeringLocations value. + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get get a list of peering locations. * * @return the peeringLocations value */ @@ -47,7 +55,7 @@ public List peeringLocations() { } /** - * Set the peeringLocations value. + * Set get a list of peering locations. * * @param peeringLocations the peeringLocations value to set * @return the ExpressRouteServiceProviderInner object itself. @@ -58,7 +66,7 @@ public ExpressRouteServiceProviderInner withPeeringLocations(List peerin } /** - * Get the bandwidthsOffered value. + * Get gets bandwidths offered. * * @return the bandwidthsOffered value */ @@ -67,7 +75,7 @@ public List bandwidthsOffered() { } /** - * Set the bandwidthsOffered value. + * Set gets bandwidths offered. * * @param bandwidthsOffered the bandwidthsOffered value to set * @return the ExpressRouteServiceProviderInner object itself. @@ -78,7 +86,7 @@ public ExpressRouteServiceProviderInner withBandwidthsOffered(List>> listS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/FlowLogInformationInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/FlowLogInformationInner.java index e5183037bcb..64cee77a405 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/FlowLogInformationInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/FlowLogInformationInner.java @@ -9,16 +9,19 @@ package com.microsoft.azure.management.network.implementation; import com.microsoft.azure.management.network.RetentionPolicyParameters; +import com.microsoft.azure.management.network.TrafficAnalyticsProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; /** - * Information on the configuration of flow log. + * Information on the configuration of flow log and traffic analytics + * (optional) . */ @JsonFlatten public class FlowLogInformationInner { /** - * The ID of the resource to configure for flow logging. + * The ID of the resource to configure for flow log and traffic analytics + * (optional) . */ @JsonProperty(value = "targetResourceId", required = true) private String targetResourceId; @@ -42,7 +45,13 @@ public class FlowLogInformationInner { private RetentionPolicyParameters retentionPolicy; /** - * Get the targetResourceId value. + * The flowAnalyticsConfiguration property. + */ + @JsonProperty(value = "flowAnalyticsConfiguration") + private TrafficAnalyticsProperties flowAnalyticsConfiguration; + + /** + * Get the ID of the resource to configure for flow log and traffic analytics (optional) . * * @return the targetResourceId value */ @@ -51,7 +60,7 @@ public String targetResourceId() { } /** - * Set the targetResourceId value. + * Set the ID of the resource to configure for flow log and traffic analytics (optional) . * * @param targetResourceId the targetResourceId value to set * @return the FlowLogInformationInner object itself. @@ -62,7 +71,7 @@ public FlowLogInformationInner withTargetResourceId(String targetResourceId) { } /** - * Get the storageId value. + * Get iD of the storage account which is used to store the flow log. * * @return the storageId value */ @@ -71,7 +80,7 @@ public String storageId() { } /** - * Set the storageId value. + * Set iD of the storage account which is used to store the flow log. * * @param storageId the storageId value to set * @return the FlowLogInformationInner object itself. @@ -82,7 +91,7 @@ public FlowLogInformationInner withStorageId(String storageId) { } /** - * Get the enabled value. + * Get flag to enable/disable flow logging. * * @return the enabled value */ @@ -91,7 +100,7 @@ public boolean enabled() { } /** - * Set the enabled value. + * Set flag to enable/disable flow logging. * * @param enabled the enabled value to set * @return the FlowLogInformationInner object itself. @@ -121,4 +130,24 @@ public FlowLogInformationInner withRetentionPolicy(RetentionPolicyParameters ret return this; } + /** + * Get the flowAnalyticsConfiguration value. + * + * @return the flowAnalyticsConfiguration value + */ + public TrafficAnalyticsProperties flowAnalyticsConfiguration() { + return this.flowAnalyticsConfiguration; + } + + /** + * Set the flowAnalyticsConfiguration value. + * + * @param flowAnalyticsConfiguration the flowAnalyticsConfiguration value to set + * @return the FlowLogInformationInner object itself. + */ + public FlowLogInformationInner withFlowAnalyticsConfiguration(TrafficAnalyticsProperties flowAnalyticsConfiguration) { + this.flowAnalyticsConfiguration = flowAnalyticsConfiguration; + return this; + } + } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/FrontendIPConfigurationInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/FrontendIPConfigurationInner.java index 7542115f9dc..cc0d108740d 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/FrontendIPConfigurationInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/FrontendIPConfigurationInner.java @@ -60,13 +60,13 @@ public class FrontendIPConfigurationInner extends SubResource { * The reference of the subnet resource. */ @JsonProperty(value = "properties.subnet") - private SubResource subnet; + private SubnetInner subnet; /** * The reference of the Public IP resource. */ @JsonProperty(value = "properties.publicIPAddress") - private SubResource publicIPAddress; + private PublicIPAddressInner publicIPAddress; /** * Gets the provisioning state of the public IP resource. Possible values @@ -75,13 +75,6 @@ public class FrontendIPConfigurationInner extends SubResource { @JsonProperty(value = "properties.provisioningState") private String provisioningState; - /** - * A list of availability zones denoting the IP allocated for the resource - * needs to come from. - */ - @JsonProperty(value = "zones") - private List zones; - /** * The name of the resource that is unique within a resource group. This * name can be used to access the resource. @@ -96,7 +89,14 @@ public class FrontendIPConfigurationInner extends SubResource { private String etag; /** - * Get the inboundNatRules value. + * A list of availability zones denoting the IP allocated for the resource + * needs to come from. + */ + @JsonProperty(value = "zones") + private List zones; + + /** + * Get read only. Inbound rules URIs that use this frontend IP. * * @return the inboundNatRules value */ @@ -105,7 +105,7 @@ public List inboundNatRules() { } /** - * Get the inboundNatPools value. + * Get read only. Inbound pools URIs that use this frontend IP. * * @return the inboundNatPools value */ @@ -114,7 +114,7 @@ public List inboundNatPools() { } /** - * Get the outboundNatRules value. + * Get read only. Outbound rules URIs that use this frontend IP. * * @return the outboundNatRules value */ @@ -123,7 +123,7 @@ public List outboundNatRules() { } /** - * Get the loadBalancingRules value. + * Get gets load balancing rules URIs that use this frontend IP. * * @return the loadBalancingRules value */ @@ -132,7 +132,7 @@ public List loadBalancingRules() { } /** - * Get the privateIPAddress value. + * Get the private IP address of the IP configuration. * * @return the privateIPAddress value */ @@ -141,7 +141,7 @@ public String privateIPAddress() { } /** - * Set the privateIPAddress value. + * Set the private IP address of the IP configuration. * * @param privateIPAddress the privateIPAddress value to set * @return the FrontendIPConfigurationInner object itself. @@ -152,7 +152,7 @@ public FrontendIPConfigurationInner withPrivateIPAddress(String privateIPAddress } /** - * Get the privateIPAllocationMethod value. + * Get the Private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'. * * @return the privateIPAllocationMethod value */ @@ -161,7 +161,7 @@ public IPAllocationMethod privateIPAllocationMethod() { } /** - * Set the privateIPAllocationMethod value. + * Set the Private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'. * * @param privateIPAllocationMethod the privateIPAllocationMethod value to set * @return the FrontendIPConfigurationInner object itself. @@ -172,47 +172,47 @@ public FrontendIPConfigurationInner withPrivateIPAllocationMethod(IPAllocationMe } /** - * Get the subnet value. + * Get the reference of the subnet resource. * * @return the subnet value */ - public SubResource subnet() { + public SubnetInner subnet() { return this.subnet; } /** - * Set the subnet value. + * Set the reference of the subnet resource. * * @param subnet the subnet value to set * @return the FrontendIPConfigurationInner object itself. */ - public FrontendIPConfigurationInner withSubnet(SubResource subnet) { + public FrontendIPConfigurationInner withSubnet(SubnetInner subnet) { this.subnet = subnet; return this; } /** - * Get the publicIPAddress value. + * Get the reference of the Public IP resource. * * @return the publicIPAddress value */ - public SubResource publicIPAddress() { + public PublicIPAddressInner publicIPAddress() { return this.publicIPAddress; } /** - * Set the publicIPAddress value. + * Set the reference of the Public IP resource. * * @param publicIPAddress the publicIPAddress value to set * @return the FrontendIPConfigurationInner object itself. */ - public FrontendIPConfigurationInner withPublicIPAddress(SubResource publicIPAddress) { + public FrontendIPConfigurationInner withPublicIPAddress(PublicIPAddressInner publicIPAddress) { this.publicIPAddress = publicIPAddress; return this; } /** - * Get the provisioningState value. + * Get gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. * * @return the provisioningState value */ @@ -221,7 +221,7 @@ public String provisioningState() { } /** - * Set the provisioningState value. + * Set gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. * * @param provisioningState the provisioningState value to set * @return the FrontendIPConfigurationInner object itself. @@ -232,27 +232,7 @@ public FrontendIPConfigurationInner withProvisioningState(String provisioningSta } /** - * Get the zones value. - * - * @return the zones value - */ - public List zones() { - return this.zones; - } - - /** - * Set the zones value. - * - * @param zones the zones value to set - * @return the FrontendIPConfigurationInner object itself. - */ - public FrontendIPConfigurationInner withZones(List zones) { - this.zones = zones; - return this; - } - - /** - * Get the name value. + * Get the name of the resource that is unique within a resource group. This name can be used to access the resource. * * @return the name value */ @@ -261,7 +241,7 @@ public String name() { } /** - * Set the name value. + * Set the name of the resource that is unique within a resource group. This name can be used to access the resource. * * @param name the name value to set * @return the FrontendIPConfigurationInner object itself. @@ -272,7 +252,7 @@ public FrontendIPConfigurationInner withName(String name) { } /** - * Get the etag value. + * Get a unique read-only string that changes whenever the resource is updated. * * @return the etag value */ @@ -281,7 +261,7 @@ public String etag() { } /** - * Set the etag value. + * Set a unique read-only string that changes whenever the resource is updated. * * @param etag the etag value to set * @return the FrontendIPConfigurationInner object itself. @@ -291,4 +271,24 @@ public FrontendIPConfigurationInner withEtag(String etag) { return this; } + /** + * Get a list of availability zones denoting the IP allocated for the resource needs to come from. + * + * @return the zones value + */ + public List zones() { + return this.zones; + } + + /** + * Set a list of availability zones denoting the IP allocated for the resource needs to come from. + * + * @param zones the zones value to set + * @return the FrontendIPConfigurationInner object itself. + */ + public FrontendIPConfigurationInner withZones(List zones) { + this.zones = zones; + return this; + } + } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/GatewayRouteListResultInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/GatewayRouteListResultInner.java index e99364f54c5..0fa53eea392 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/GatewayRouteListResultInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/GatewayRouteListResultInner.java @@ -23,7 +23,7 @@ public class GatewayRouteListResultInner { private List value; /** - * Get the value value. + * Get list of gateway routes. * * @return the value value */ @@ -32,7 +32,7 @@ public List value() { } /** - * Set the value value. + * Set list of gateway routes. * * @param value the value value to set * @return the GatewayRouteListResultInner object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/IPAddressAvailabilityResultInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/IPAddressAvailabilityResultInner.java index 24ec5dae119..ddfe2a4c687 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/IPAddressAvailabilityResultInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/IPAddressAvailabilityResultInner.java @@ -29,7 +29,7 @@ public class IPAddressAvailabilityResultInner { private List availableIPAddresses; /** - * Get the available value. + * Get private IP address availability. * * @return the available value */ @@ -38,7 +38,7 @@ public Boolean available() { } /** - * Set the available value. + * Set private IP address availability. * * @param available the available value to set * @return the IPAddressAvailabilityResultInner object itself. @@ -49,7 +49,7 @@ public IPAddressAvailabilityResultInner withAvailable(Boolean available) { } /** - * Get the availableIPAddresses value. + * Get contains other available private IP addresses if the asked for address is taken. * * @return the availableIPAddresses value */ @@ -58,7 +58,7 @@ public List availableIPAddresses() { } /** - * Set the availableIPAddresses value. + * Set contains other available private IP addresses if the asked for address is taken. * * @param availableIPAddresses the availableIPAddresses value to set * @return the IPAddressAvailabilityResultInner object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/IPConfigurationInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/IPConfigurationInner.java index 3d50617eb1b..7c10ad32c65 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/IPConfigurationInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/IPConfigurationInner.java @@ -64,7 +64,7 @@ public class IPConfigurationInner extends SubResource { private String etag; /** - * Get the privateIPAddress value. + * Get the private IP address of the IP configuration. * * @return the privateIPAddress value */ @@ -73,7 +73,7 @@ public String privateIPAddress() { } /** - * Set the privateIPAddress value. + * Set the private IP address of the IP configuration. * * @param privateIPAddress the privateIPAddress value to set * @return the IPConfigurationInner object itself. @@ -84,7 +84,7 @@ public IPConfigurationInner withPrivateIPAddress(String privateIPAddress) { } /** - * Get the privateIPAllocationMethod value. + * Get the private IP allocation method. Possible values are 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'. * * @return the privateIPAllocationMethod value */ @@ -93,7 +93,7 @@ public IPAllocationMethod privateIPAllocationMethod() { } /** - * Set the privateIPAllocationMethod value. + * Set the private IP allocation method. Possible values are 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'. * * @param privateIPAllocationMethod the privateIPAllocationMethod value to set * @return the IPConfigurationInner object itself. @@ -104,7 +104,7 @@ public IPConfigurationInner withPrivateIPAllocationMethod(IPAllocationMethod pri } /** - * Get the subnet value. + * Get the reference of the subnet resource. * * @return the subnet value */ @@ -113,7 +113,7 @@ public SubnetInner subnet() { } /** - * Set the subnet value. + * Set the reference of the subnet resource. * * @param subnet the subnet value to set * @return the IPConfigurationInner object itself. @@ -124,7 +124,7 @@ public IPConfigurationInner withSubnet(SubnetInner subnet) { } /** - * Get the publicIPAddress value. + * Get the reference of the public IP resource. * * @return the publicIPAddress value */ @@ -133,7 +133,7 @@ public PublicIPAddressInner publicIPAddress() { } /** - * Set the publicIPAddress value. + * Set the reference of the public IP resource. * * @param publicIPAddress the publicIPAddress value to set * @return the IPConfigurationInner object itself. @@ -144,7 +144,7 @@ public IPConfigurationInner withPublicIPAddress(PublicIPAddressInner publicIPAdd } /** - * Get the provisioningState value. + * Get gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. * * @return the provisioningState value */ @@ -153,7 +153,7 @@ public String provisioningState() { } /** - * Set the provisioningState value. + * Set gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. * * @param provisioningState the provisioningState value to set * @return the IPConfigurationInner object itself. @@ -164,7 +164,7 @@ public IPConfigurationInner withProvisioningState(String provisioningState) { } /** - * Get the name value. + * Get the name of the resource that is unique within a resource group. This name can be used to access the resource. * * @return the name value */ @@ -173,7 +173,7 @@ public String name() { } /** - * Set the name value. + * Set the name of the resource that is unique within a resource group. This name can be used to access the resource. * * @param name the name value to set * @return the IPConfigurationInner object itself. @@ -184,7 +184,7 @@ public IPConfigurationInner withName(String name) { } /** - * Get the etag value. + * Get a unique read-only string that changes whenever the resource is updated. * * @return the etag value */ @@ -193,7 +193,7 @@ public String etag() { } /** - * Set the etag value. + * Set a unique read-only string that changes whenever the resource is updated. * * @param etag the etag value to set * @return the IPConfigurationInner object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/InboundNatPoolInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/InboundNatPoolInner.java index a9ee803c898..8fa4e6230a3 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/InboundNatPoolInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/InboundNatPoolInner.java @@ -25,8 +25,7 @@ public class InboundNatPoolInner extends SubResource { private SubResource frontendIPConfiguration; /** - * The transport protocol for the endpoint. Possible values are: 'Udp' or - * 'Tcp'. Possible values include: 'Udp', 'Tcp'. + * Possible values include: 'Udp', 'Tcp', 'All'. */ @JsonProperty(value = "properties.protocol", required = true) private TransportProtocol protocol; @@ -54,6 +53,23 @@ public class InboundNatPoolInner extends SubResource { @JsonProperty(value = "properties.backendPort", required = true) private int backendPort; + /** + * The timeout for the TCP idle connection. The value can be set between 4 + * and 30 minutes. The default value is 4 minutes. This element is only + * used when the protocol is set to TCP. + */ + @JsonProperty(value = "properties.idleTimeoutInMinutes") + private Integer idleTimeoutInMinutes; + + /** + * Configures a virtual machine's endpoint for the floating IP capability + * required to configure a SQL AlwaysOn Availability Group. This setting is + * required when using the SQL AlwaysOn Availability Groups in SQL server. + * This setting can't be changed after you create the endpoint. + */ + @JsonProperty(value = "properties.enableFloatingIP") + private Boolean enableFloatingIP; + /** * Gets the provisioning state of the PublicIP resource. Possible values * are: 'Updating', 'Deleting', and 'Failed'. @@ -75,7 +91,7 @@ public class InboundNatPoolInner extends SubResource { private String etag; /** - * Get the frontendIPConfiguration value. + * Get a reference to frontend IP addresses. * * @return the frontendIPConfiguration value */ @@ -84,7 +100,7 @@ public SubResource frontendIPConfiguration() { } /** - * Set the frontendIPConfiguration value. + * Set a reference to frontend IP addresses. * * @param frontendIPConfiguration the frontendIPConfiguration value to set * @return the InboundNatPoolInner object itself. @@ -95,7 +111,7 @@ public InboundNatPoolInner withFrontendIPConfiguration(SubResource frontendIPCon } /** - * Get the protocol value. + * Get possible values include: 'Udp', 'Tcp', 'All'. * * @return the protocol value */ @@ -104,7 +120,7 @@ public TransportProtocol protocol() { } /** - * Set the protocol value. + * Set possible values include: 'Udp', 'Tcp', 'All'. * * @param protocol the protocol value to set * @return the InboundNatPoolInner object itself. @@ -115,7 +131,7 @@ public InboundNatPoolInner withProtocol(TransportProtocol protocol) { } /** - * Get the frontendPortRangeStart value. + * Get the first port number in the range of external ports that will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range between 1 and 65534. * * @return the frontendPortRangeStart value */ @@ -124,7 +140,7 @@ public int frontendPortRangeStart() { } /** - * Set the frontendPortRangeStart value. + * Set the first port number in the range of external ports that will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range between 1 and 65534. * * @param frontendPortRangeStart the frontendPortRangeStart value to set * @return the InboundNatPoolInner object itself. @@ -135,7 +151,7 @@ public InboundNatPoolInner withFrontendPortRangeStart(int frontendPortRangeStart } /** - * Get the frontendPortRangeEnd value. + * Get the last port number in the range of external ports that will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range between 1 and 65535. * * @return the frontendPortRangeEnd value */ @@ -144,7 +160,7 @@ public int frontendPortRangeEnd() { } /** - * Set the frontendPortRangeEnd value. + * Set the last port number in the range of external ports that will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range between 1 and 65535. * * @param frontendPortRangeEnd the frontendPortRangeEnd value to set * @return the InboundNatPoolInner object itself. @@ -155,7 +171,7 @@ public InboundNatPoolInner withFrontendPortRangeEnd(int frontendPortRangeEnd) { } /** - * Get the backendPort value. + * Get the port used for internal connections on the endpoint. Acceptable values are between 1 and 65535. * * @return the backendPort value */ @@ -164,7 +180,7 @@ public int backendPort() { } /** - * Set the backendPort value. + * Set the port used for internal connections on the endpoint. Acceptable values are between 1 and 65535. * * @param backendPort the backendPort value to set * @return the InboundNatPoolInner object itself. @@ -175,7 +191,47 @@ public InboundNatPoolInner withBackendPort(int backendPort) { } /** - * Get the provisioningState value. + * Get the timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP. + * + * @return the idleTimeoutInMinutes value + */ + public Integer idleTimeoutInMinutes() { + return this.idleTimeoutInMinutes; + } + + /** + * Set the timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP. + * + * @param idleTimeoutInMinutes the idleTimeoutInMinutes value to set + * @return the InboundNatPoolInner object itself. + */ + public InboundNatPoolInner withIdleTimeoutInMinutes(Integer idleTimeoutInMinutes) { + this.idleTimeoutInMinutes = idleTimeoutInMinutes; + return this; + } + + /** + * Get configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint. + * + * @return the enableFloatingIP value + */ + public Boolean enableFloatingIP() { + return this.enableFloatingIP; + } + + /** + * Set configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint. + * + * @param enableFloatingIP the enableFloatingIP value to set + * @return the InboundNatPoolInner object itself. + */ + public InboundNatPoolInner withEnableFloatingIP(Boolean enableFloatingIP) { + this.enableFloatingIP = enableFloatingIP; + return this; + } + + /** + * Get gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. * * @return the provisioningState value */ @@ -184,7 +240,7 @@ public String provisioningState() { } /** - * Set the provisioningState value. + * Set gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. * * @param provisioningState the provisioningState value to set * @return the InboundNatPoolInner object itself. @@ -195,7 +251,7 @@ public InboundNatPoolInner withProvisioningState(String provisioningState) { } /** - * Get the name value. + * Get the name of the resource that is unique within a resource group. This name can be used to access the resource. * * @return the name value */ @@ -204,7 +260,7 @@ public String name() { } /** - * Set the name value. + * Set the name of the resource that is unique within a resource group. This name can be used to access the resource. * * @param name the name value to set * @return the InboundNatPoolInner object itself. @@ -215,7 +271,7 @@ public InboundNatPoolInner withName(String name) { } /** - * Get the etag value. + * Get a unique read-only string that changes whenever the resource is updated. * * @return the etag value */ @@ -224,7 +280,7 @@ public String etag() { } /** - * Set the etag value. + * Set a unique read-only string that changes whenever the resource is updated. * * @param etag the etag value to set * @return the InboundNatPoolInner object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/InboundNatRuleInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/InboundNatRuleInner.java index 20fcfc9766a..ac4a6784546 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/InboundNatRuleInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/InboundNatRuleInner.java @@ -33,14 +33,13 @@ public class InboundNatRuleInner extends SubResource { private NetworkInterfaceIPConfigurationInner backendIPConfiguration; /** - * The transport protocol for the endpoint. Possible values are: 'Udp' or - * 'Tcp'. Possible values include: 'Udp', 'Tcp'. + * Possible values include: 'Udp', 'Tcp', 'All'. */ @JsonProperty(value = "properties.protocol") private TransportProtocol protocol; /** - * The port for the external endpoint. Port numbers for each Rule must be + * The port for the external endpoint. Port numbers for each rule must be * unique within the Load Balancer. Acceptable values range from 1 to * 65534. */ @@ -92,7 +91,7 @@ public class InboundNatRuleInner extends SubResource { private String etag; /** - * Get the frontendIPConfiguration value. + * Get a reference to frontend IP addresses. * * @return the frontendIPConfiguration value */ @@ -101,7 +100,7 @@ public SubResource frontendIPConfiguration() { } /** - * Set the frontendIPConfiguration value. + * Set a reference to frontend IP addresses. * * @param frontendIPConfiguration the frontendIPConfiguration value to set * @return the InboundNatRuleInner object itself. @@ -112,7 +111,7 @@ public InboundNatRuleInner withFrontendIPConfiguration(SubResource frontendIPCon } /** - * Get the backendIPConfiguration value. + * Get a reference to a private IP address defined on a network interface of a VM. Traffic sent to the frontend port of each of the frontend IP configurations is forwarded to the backend IP. * * @return the backendIPConfiguration value */ @@ -121,7 +120,7 @@ public NetworkInterfaceIPConfigurationInner backendIPConfiguration() { } /** - * Get the protocol value. + * Get possible values include: 'Udp', 'Tcp', 'All'. * * @return the protocol value */ @@ -130,7 +129,7 @@ public TransportProtocol protocol() { } /** - * Set the protocol value. + * Set possible values include: 'Udp', 'Tcp', 'All'. * * @param protocol the protocol value to set * @return the InboundNatRuleInner object itself. @@ -141,7 +140,7 @@ public InboundNatRuleInner withProtocol(TransportProtocol protocol) { } /** - * Get the frontendPort value. + * Get the port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values range from 1 to 65534. * * @return the frontendPort value */ @@ -150,7 +149,7 @@ public Integer frontendPort() { } /** - * Set the frontendPort value. + * Set the port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values range from 1 to 65534. * * @param frontendPort the frontendPort value to set * @return the InboundNatRuleInner object itself. @@ -161,7 +160,7 @@ public InboundNatRuleInner withFrontendPort(Integer frontendPort) { } /** - * Get the backendPort value. + * Get the port used for the internal endpoint. Acceptable values range from 1 to 65535. * * @return the backendPort value */ @@ -170,7 +169,7 @@ public Integer backendPort() { } /** - * Set the backendPort value. + * Set the port used for the internal endpoint. Acceptable values range from 1 to 65535. * * @param backendPort the backendPort value to set * @return the InboundNatRuleInner object itself. @@ -181,7 +180,7 @@ public InboundNatRuleInner withBackendPort(Integer backendPort) { } /** - * Get the idleTimeoutInMinutes value. + * Get the timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP. * * @return the idleTimeoutInMinutes value */ @@ -190,7 +189,7 @@ public Integer idleTimeoutInMinutes() { } /** - * Set the idleTimeoutInMinutes value. + * Set the timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP. * * @param idleTimeoutInMinutes the idleTimeoutInMinutes value to set * @return the InboundNatRuleInner object itself. @@ -201,7 +200,7 @@ public InboundNatRuleInner withIdleTimeoutInMinutes(Integer idleTimeoutInMinutes } /** - * Get the enableFloatingIP value. + * Get configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint. * * @return the enableFloatingIP value */ @@ -210,7 +209,7 @@ public Boolean enableFloatingIP() { } /** - * Set the enableFloatingIP value. + * Set configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint. * * @param enableFloatingIP the enableFloatingIP value to set * @return the InboundNatRuleInner object itself. @@ -221,7 +220,7 @@ public InboundNatRuleInner withEnableFloatingIP(Boolean enableFloatingIP) { } /** - * Get the provisioningState value. + * Get gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. * * @return the provisioningState value */ @@ -230,7 +229,7 @@ public String provisioningState() { } /** - * Set the provisioningState value. + * Set gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. * * @param provisioningState the provisioningState value to set * @return the InboundNatRuleInner object itself. @@ -241,7 +240,7 @@ public InboundNatRuleInner withProvisioningState(String provisioningState) { } /** - * Get the name value. + * Get gets name of the resource that is unique within a resource group. This name can be used to access the resource. * * @return the name value */ @@ -250,7 +249,7 @@ public String name() { } /** - * Set the name value. + * Set gets name of the resource that is unique within a resource group. This name can be used to access the resource. * * @param name the name value to set * @return the InboundNatRuleInner object itself. @@ -261,7 +260,7 @@ public InboundNatRuleInner withName(String name) { } /** - * Get the etag value. + * Get a unique read-only string that changes whenever the resource is updated. * * @return the etag value */ @@ -270,7 +269,7 @@ public String etag() { } /** - * Set the etag value. + * Set a unique read-only string that changes whenever the resource is updated. * * @param etag the etag value to set * @return the InboundNatRuleInner object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/InboundNatRulesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/InboundNatRulesInner.java index 3eb83f8253e..39ade7c5f21 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/InboundNatRulesInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/InboundNatRulesInner.java @@ -190,7 +190,7 @@ public Observable>> listSinglePageAsyn if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -280,7 +280,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.delete(resourceGroupName, loadBalancerName, inboundNatRuleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -353,7 +353,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, loadBalancerName, inboundNatRuleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -370,9 +370,9 @@ public Observable> call(Response response) { private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -446,7 +446,7 @@ public Observable> getWithServiceResponseAs if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; final String expand = null; return service.get(resourceGroupName, loadBalancerName, inboundNatRuleName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -535,7 +535,7 @@ public Observable> getWithServiceResponseAs if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.get(resourceGroupName, loadBalancerName, inboundNatRuleName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -634,7 +634,7 @@ public Observable> createOrUpdateWithServic throw new IllegalArgumentException("Parameter inboundNatRuleParameters is required and cannot be null."); } Validator.validate(inboundNatRuleParameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.createOrUpdate(resourceGroupName, loadBalancerName, inboundNatRuleName, this.client.subscriptionId(), inboundNatRuleParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -716,7 +716,7 @@ public Observable> beginCreateOrUpdateWithS throw new IllegalArgumentException("Parameter inboundNatRuleParameters is required and cannot be null."); } Validator.validate(inboundNatRuleParameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, loadBalancerName, inboundNatRuleName, this.client.subscriptionId(), inboundNatRuleParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -733,8 +733,8 @@ public Observable> call(Response beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(201, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerBackendAddressPoolsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerBackendAddressPoolsInner.java index 947e559171b..f2c932fce3a 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerBackendAddressPoolsInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerBackendAddressPoolsInner.java @@ -170,7 +170,7 @@ public Observable>> listSinglePage if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -261,7 +261,7 @@ public Observable> getWithServiceRespon if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.get(resourceGroupName, loadBalancerName, backendAddressPoolName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerFrontendIPConfigurationsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerFrontendIPConfigurationsInner.java index e59db9a3f1e..995d01cce6d 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerFrontendIPConfigurationsInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerFrontendIPConfigurationsInner.java @@ -170,7 +170,7 @@ public Observable>> listSingl if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -261,7 +261,7 @@ public Observable> getWithServiceR if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.get(resourceGroupName, loadBalancerName, frontendIPConfigurationName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerInner.java index e691a8e12ce..c29be13a267 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerInner.java @@ -12,12 +12,14 @@ import java.util.List; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; import com.microsoft.azure.Resource; /** * LoadBalancer resource. */ @JsonFlatten +@SkipParentValidation public class LoadBalancerInner extends Resource { /** * The load balancer SKU. @@ -100,14 +102,13 @@ public class LoadBalancerInner extends Resource { private String etag; /** - * A list of availability zones denoting the IP allocated for the resource - * needs to come from. + * Resource ID. */ - @JsonProperty(value = "zones") - private List zones; + @JsonProperty(value = "id") + private String id; /** - * Get the sku value. + * Get the load balancer SKU. * * @return the sku value */ @@ -116,7 +117,7 @@ public LoadBalancerSku sku() { } /** - * Set the sku value. + * Set the load balancer SKU. * * @param sku the sku value to set * @return the LoadBalancerInner object itself. @@ -127,7 +128,7 @@ public LoadBalancerInner withSku(LoadBalancerSku sku) { } /** - * Get the frontendIPConfigurations value. + * Get object representing the frontend IPs to be used for the load balancer. * * @return the frontendIPConfigurations value */ @@ -136,7 +137,7 @@ public List frontendIPConfigurations() { } /** - * Set the frontendIPConfigurations value. + * Set object representing the frontend IPs to be used for the load balancer. * * @param frontendIPConfigurations the frontendIPConfigurations value to set * @return the LoadBalancerInner object itself. @@ -147,7 +148,7 @@ public LoadBalancerInner withFrontendIPConfigurations(List backendAddressPools() { } /** - * Set the backendAddressPools value. + * Set collection of backend address pools used by a load balancer. * * @param backendAddressPools the backendAddressPools value to set * @return the LoadBalancerInner object itself. @@ -167,7 +168,7 @@ public LoadBalancerInner withBackendAddressPools(List b } /** - * Get the loadBalancingRules value. + * Get object collection representing the load balancing rules Gets the provisioning. * * @return the loadBalancingRules value */ @@ -176,7 +177,7 @@ public List loadBalancingRules() { } /** - * Set the loadBalancingRules value. + * Set object collection representing the load balancing rules Gets the provisioning. * * @param loadBalancingRules the loadBalancingRules value to set * @return the LoadBalancerInner object itself. @@ -187,7 +188,7 @@ public LoadBalancerInner withLoadBalancingRules(List loa } /** - * Get the probes value. + * Get collection of probe objects used in the load balancer. * * @return the probes value */ @@ -196,7 +197,7 @@ public List probes() { } /** - * Set the probes value. + * Set collection of probe objects used in the load balancer. * * @param probes the probes value to set * @return the LoadBalancerInner object itself. @@ -207,7 +208,7 @@ public LoadBalancerInner withProbes(List probes) { } /** - * Get the inboundNatRules value. + * Get collection of inbound NAT Rules used by a load balancer. Defining inbound NAT rules on your load balancer is mutually exclusive with defining an inbound NAT pool. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an Inbound NAT pool. They have to reference individual inbound NAT rules. * * @return the inboundNatRules value */ @@ -216,7 +217,7 @@ public List inboundNatRules() { } /** - * Set the inboundNatRules value. + * Set collection of inbound NAT Rules used by a load balancer. Defining inbound NAT rules on your load balancer is mutually exclusive with defining an inbound NAT pool. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an Inbound NAT pool. They have to reference individual inbound NAT rules. * * @param inboundNatRules the inboundNatRules value to set * @return the LoadBalancerInner object itself. @@ -227,7 +228,7 @@ public LoadBalancerInner withInboundNatRules(List inboundNa } /** - * Get the inboundNatPools value. + * Get defines an external port range for inbound NAT to a single backend port on NICs associated with a load balancer. Inbound NAT rules are created automatically for each NIC associated with the Load Balancer using an external port from this range. Defining an Inbound NAT pool on your Load Balancer is mutually exclusive with defining inbound Nat rules. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an inbound NAT pool. They have to reference individual inbound NAT rules. * * @return the inboundNatPools value */ @@ -236,7 +237,7 @@ public List inboundNatPools() { } /** - * Set the inboundNatPools value. + * Set defines an external port range for inbound NAT to a single backend port on NICs associated with a load balancer. Inbound NAT rules are created automatically for each NIC associated with the Load Balancer using an external port from this range. Defining an Inbound NAT pool on your Load Balancer is mutually exclusive with defining inbound Nat rules. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an inbound NAT pool. They have to reference individual inbound NAT rules. * * @param inboundNatPools the inboundNatPools value to set * @return the LoadBalancerInner object itself. @@ -247,7 +248,7 @@ public LoadBalancerInner withInboundNatPools(List inboundNa } /** - * Get the outboundNatRules value. + * Get the outbound NAT rules. * * @return the outboundNatRules value */ @@ -256,7 +257,7 @@ public List outboundNatRules() { } /** - * Set the outboundNatRules value. + * Set the outbound NAT rules. * * @param outboundNatRules the outboundNatRules value to set * @return the LoadBalancerInner object itself. @@ -267,7 +268,7 @@ public LoadBalancerInner withOutboundNatRules(List outboun } /** - * Get the resourceGuid value. + * Get the resource GUID property of the load balancer resource. * * @return the resourceGuid value */ @@ -276,7 +277,7 @@ public String resourceGuid() { } /** - * Set the resourceGuid value. + * Set the resource GUID property of the load balancer resource. * * @param resourceGuid the resourceGuid value to set * @return the LoadBalancerInner object itself. @@ -287,7 +288,7 @@ public LoadBalancerInner withResourceGuid(String resourceGuid) { } /** - * Get the provisioningState value. + * Get gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. * * @return the provisioningState value */ @@ -296,7 +297,7 @@ public String provisioningState() { } /** - * Set the provisioningState value. + * Set gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. * * @param provisioningState the provisioningState value to set * @return the LoadBalancerInner object itself. @@ -307,7 +308,7 @@ public LoadBalancerInner withProvisioningState(String provisioningState) { } /** - * Get the etag value. + * Get a unique read-only string that changes whenever the resource is updated. * * @return the etag value */ @@ -316,7 +317,7 @@ public String etag() { } /** - * Set the etag value. + * Set a unique read-only string that changes whenever the resource is updated. * * @param etag the etag value to set * @return the LoadBalancerInner object itself. @@ -327,22 +328,22 @@ public LoadBalancerInner withEtag(String etag) { } /** - * Get the zones value. + * Get resource ID. * - * @return the zones value + * @return the id value */ - public List zones() { - return this.zones; + public String id() { + return this.id; } /** - * Set the zones value. + * Set resource ID. * - * @param zones the zones value to set + * @param id the id value to set * @return the LoadBalancerInner object itself. */ - public LoadBalancerInner withZones(List zones) { - this.zones = zones; + public LoadBalancerInner withId(String id) { + this.id = id; return this; } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerLoadBalancingRulesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerLoadBalancingRulesInner.java index 7cf2a722173..33f05b5f887 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerLoadBalancingRulesInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerLoadBalancingRulesInner.java @@ -170,7 +170,7 @@ public Observable>> listSinglePageA if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -261,7 +261,7 @@ public Observable> getWithServiceRespons if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.get(resourceGroupName, loadBalancerName, loadBalancingRuleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerNetworkInterfacesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerNetworkInterfacesInner.java index 1224a54b02c..76dad7fd5a8 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerNetworkInterfacesInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerNetworkInterfacesInner.java @@ -165,7 +165,7 @@ public Observable>> listSinglePageAs if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerProbesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerProbesInner.java index b1890507fa8..5e269a3b21f 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerProbesInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerProbesInner.java @@ -170,7 +170,7 @@ public Observable>> listSinglePageAsync(final S if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -261,7 +261,7 @@ public Observable> getWithServiceResponseAsync(Strin if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.get(resourceGroupName, loadBalancerName, probeName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancersInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancersInner.java index e0afbcadfb0..5ea1f17cec2 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancersInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancersInner.java @@ -16,6 +16,7 @@ import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.network.TagsObject; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -24,12 +25,14 @@ import com.microsoft.rest.Validator; import java.io.IOException; import java.util.List; +import java.util.Map; import okhttp3.ResponseBody; import retrofit2.http.Body; import retrofit2.http.GET; import retrofit2.http.Header; import retrofit2.http.Headers; import retrofit2.http.HTTP; +import retrofit2.http.PATCH; import retrofit2.http.Path; import retrofit2.http.PUT; import retrofit2.http.Query; @@ -84,6 +87,14 @@ interface LoadBalancersService { @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}") Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("loadBalancerName") String loadBalancerName, @Path("subscriptionId") String subscriptionId, @Body LoadBalancerInner 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.network.LoadBalancers updateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}") + Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("loadBalancerName") String loadBalancerName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.LoadBalancers beginUpdateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}") + Observable> beginUpdateTags(@Path("resourceGroupName") String resourceGroupName, @Path("loadBalancerName") String loadBalancerName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.LoadBalancers list" }) @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/loadBalancers") Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -163,7 +174,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.delete(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -229,7 +240,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -246,9 +257,9 @@ public Observable> call(Response response) { private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -315,7 +326,7 @@ public Observable> getByResourceGroupWithServ if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; final String expand = null; return service.getByResourceGroup(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -397,7 +408,7 @@ public Observable> getByResourceGroupWithServ if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.getByResourceGroup(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -489,7 +500,7 @@ public Observable> createOrUpdateWithServiceR throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.createOrUpdate(resourceGroupName, loadBalancerName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -564,7 +575,7 @@ public Observable> beginCreateOrUpdateWithSer throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, loadBalancerName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -581,7 +592,321 @@ public Observable> call(Response beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates a load balancer tags. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the LoadBalancerInner object if successful. + */ + public LoadBalancerInner updateTags(String resourceGroupName, String loadBalancerName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, loadBalancerName).toBlocking().last().body(); + } + + /** + * Updates a load balancer tags. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateTagsAsync(String resourceGroupName, String loadBalancerName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, loadBalancerName), serviceCallback); + } + + /** + * Updates a load balancer tags. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateTagsAsync(String resourceGroupName, String loadBalancerName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, loadBalancerName).map(new Func1, LoadBalancerInner>() { + @Override + public LoadBalancerInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a load balancer tags. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String loadBalancerName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (loadBalancerName == null) { + throw new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + Observable> observable = service.updateTags(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Updates a load balancer tags. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the LoadBalancerInner object if successful. + */ + public LoadBalancerInner updateTags(String resourceGroupName, String loadBalancerName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, loadBalancerName, tags).toBlocking().last().body(); + } + + /** + * Updates a load balancer tags. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param tags Resource tags. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateTagsAsync(String resourceGroupName, String loadBalancerName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, loadBalancerName, tags), serviceCallback); + } + + /** + * Updates a load balancer tags. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateTagsAsync(String resourceGroupName, String loadBalancerName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, loadBalancerName, tags).map(new Func1, LoadBalancerInner>() { + @Override + public LoadBalancerInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a load balancer tags. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String loadBalancerName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (loadBalancerName == null) { + throw new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + Observable> observable = service.updateTags(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Updates a load balancer tags. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the LoadBalancerInner object if successful. + */ + public LoadBalancerInner beginUpdateTags(String resourceGroupName, String loadBalancerName) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, loadBalancerName).toBlocking().single().body(); + } + + /** + * Updates a load balancer tags. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateTagsAsync(String resourceGroupName, String loadBalancerName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, loadBalancerName), serviceCallback); + } + + /** + * Updates a load balancer tags. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LoadBalancerInner object + */ + public Observable beginUpdateTagsAsync(String resourceGroupName, String loadBalancerName) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, loadBalancerName).map(new Func1, LoadBalancerInner>() { + @Override + public LoadBalancerInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a load balancer tags. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LoadBalancerInner object + */ + public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String loadBalancerName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (loadBalancerName == null) { + throw new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.beginUpdateTags(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates a load balancer tags. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the LoadBalancerInner object if successful. + */ + public LoadBalancerInner beginUpdateTags(String resourceGroupName, String loadBalancerName, Map tags) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, loadBalancerName, tags).toBlocking().single().body(); + } + + /** + * Updates a load balancer tags. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param tags Resource tags. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateTagsAsync(String resourceGroupName, String loadBalancerName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, loadBalancerName, tags), serviceCallback); + } + + /** + * Updates a load balancer tags. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LoadBalancerInner object + */ + public Observable beginUpdateTagsAsync(String resourceGroupName, String loadBalancerName, Map tags) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, loadBalancerName, tags).map(new Func1, LoadBalancerInner>() { + @Override + public LoadBalancerInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a load balancer tags. + * + * @param resourceGroupName The name of the resource group. + * @param loadBalancerName The name of the load balancer. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LoadBalancerInner object + */ + public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String loadBalancerName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (loadBalancerName == null) { + throw new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.beginUpdateTags(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateTagsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -670,7 +995,7 @@ public Observable>> listSinglePageAsync( if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -783,7 +1108,7 @@ public Observable>> listByResourceGroupS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancingRuleInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancingRuleInner.java index 068382ae7ea..4d88846a257 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancingRuleInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancingRuleInner.java @@ -40,8 +40,7 @@ public class LoadBalancingRuleInner extends SubResource { private SubResource probe; /** - * The transport protocol for the external endpoint. Possible values are - * 'Udp' or 'Tcp'. Possible values include: 'Udp', 'Tcp'. + * Possible values include: 'Udp', 'Tcp', 'All'. */ @JsonProperty(value = "properties.protocol", required = true) private TransportProtocol protocol; @@ -55,16 +54,16 @@ public class LoadBalancingRuleInner extends SubResource { private LoadDistribution loadDistribution; /** - * The port for the external endpoint. Port numbers for each Rule must be - * unique within the Load Balancer. Acceptable values are between 1 and - * 65534. + * The port for the external endpoint. Port numbers for each rule must be + * unique within the Load Balancer. Acceptable values are between 0 and + * 65534. Note that value 0 enables "Any Port". */ @JsonProperty(value = "properties.frontendPort", required = true) private int frontendPort; /** * The port used for internal connections on the endpoint. Acceptable - * values are between 1 and 65535. + * values are between 0 and 65535. Note that value 0 enables "Any Port". */ @JsonProperty(value = "properties.backendPort") private Integer backendPort; @@ -114,7 +113,7 @@ public class LoadBalancingRuleInner extends SubResource { private String etag; /** - * Get the frontendIPConfiguration value. + * Get a reference to frontend IP addresses. * * @return the frontendIPConfiguration value */ @@ -123,7 +122,7 @@ public SubResource frontendIPConfiguration() { } /** - * Set the frontendIPConfiguration value. + * Set a reference to frontend IP addresses. * * @param frontendIPConfiguration the frontendIPConfiguration value to set * @return the LoadBalancingRuleInner object itself. @@ -134,7 +133,7 @@ public LoadBalancingRuleInner withFrontendIPConfiguration(SubResource frontendIP } /** - * Get the backendAddressPool value. + * Get a reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs. * * @return the backendAddressPool value */ @@ -143,7 +142,7 @@ public SubResource backendAddressPool() { } /** - * Set the backendAddressPool value. + * Set a reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs. * * @param backendAddressPool the backendAddressPool value to set * @return the LoadBalancingRuleInner object itself. @@ -154,7 +153,7 @@ public LoadBalancingRuleInner withBackendAddressPool(SubResource backendAddressP } /** - * Get the probe value. + * Get the reference of the load balancer probe used by the load balancing rule. * * @return the probe value */ @@ -163,7 +162,7 @@ public SubResource probe() { } /** - * Set the probe value. + * Set the reference of the load balancer probe used by the load balancing rule. * * @param probe the probe value to set * @return the LoadBalancingRuleInner object itself. @@ -174,7 +173,7 @@ public LoadBalancingRuleInner withProbe(SubResource probe) { } /** - * Get the protocol value. + * Get possible values include: 'Udp', 'Tcp', 'All'. * * @return the protocol value */ @@ -183,7 +182,7 @@ public TransportProtocol protocol() { } /** - * Set the protocol value. + * Set possible values include: 'Udp', 'Tcp', 'All'. * * @param protocol the protocol value to set * @return the LoadBalancingRuleInner object itself. @@ -194,7 +193,7 @@ public LoadBalancingRuleInner withProtocol(TransportProtocol protocol) { } /** - * Get the loadDistribution value. + * Get the load distribution policy for this rule. Possible values are 'Default', 'SourceIP', and 'SourceIPProtocol'. Possible values include: 'Default', 'SourceIP', 'SourceIPProtocol'. * * @return the loadDistribution value */ @@ -203,7 +202,7 @@ public LoadDistribution loadDistribution() { } /** - * Set the loadDistribution value. + * Set the load distribution policy for this rule. Possible values are 'Default', 'SourceIP', and 'SourceIPProtocol'. Possible values include: 'Default', 'SourceIP', 'SourceIPProtocol'. * * @param loadDistribution the loadDistribution value to set * @return the LoadBalancingRuleInner object itself. @@ -214,7 +213,7 @@ public LoadBalancingRuleInner withLoadDistribution(LoadDistribution loadDistribu } /** - * Get the frontendPort value. + * Get the port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values are between 0 and 65534. Note that value 0 enables "Any Port". * * @return the frontendPort value */ @@ -223,7 +222,7 @@ public int frontendPort() { } /** - * Set the frontendPort value. + * Set the port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values are between 0 and 65534. Note that value 0 enables "Any Port". * * @param frontendPort the frontendPort value to set * @return the LoadBalancingRuleInner object itself. @@ -234,7 +233,7 @@ public LoadBalancingRuleInner withFrontendPort(int frontendPort) { } /** - * Get the backendPort value. + * Get the port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port". * * @return the backendPort value */ @@ -243,7 +242,7 @@ public Integer backendPort() { } /** - * Set the backendPort value. + * Set the port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port". * * @param backendPort the backendPort value to set * @return the LoadBalancingRuleInner object itself. @@ -254,7 +253,7 @@ public LoadBalancingRuleInner withBackendPort(Integer backendPort) { } /** - * Get the idleTimeoutInMinutes value. + * Get the timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP. * * @return the idleTimeoutInMinutes value */ @@ -263,7 +262,7 @@ public Integer idleTimeoutInMinutes() { } /** - * Set the idleTimeoutInMinutes value. + * Set the timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP. * * @param idleTimeoutInMinutes the idleTimeoutInMinutes value to set * @return the LoadBalancingRuleInner object itself. @@ -274,7 +273,7 @@ public LoadBalancingRuleInner withIdleTimeoutInMinutes(Integer idleTimeoutInMinu } /** - * Get the enableFloatingIP value. + * Get configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint. * * @return the enableFloatingIP value */ @@ -283,7 +282,7 @@ public Boolean enableFloatingIP() { } /** - * Set the enableFloatingIP value. + * Set configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint. * * @param enableFloatingIP the enableFloatingIP value to set * @return the LoadBalancingRuleInner object itself. @@ -294,7 +293,7 @@ public LoadBalancingRuleInner withEnableFloatingIP(Boolean enableFloatingIP) { } /** - * Get the disableOutboundSnat value. + * Get configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule. * * @return the disableOutboundSnat value */ @@ -303,7 +302,7 @@ public Boolean disableOutboundSnat() { } /** - * Set the disableOutboundSnat value. + * Set configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule. * * @param disableOutboundSnat the disableOutboundSnat value to set * @return the LoadBalancingRuleInner object itself. @@ -314,7 +313,7 @@ public LoadBalancingRuleInner withDisableOutboundSnat(Boolean disableOutboundSna } /** - * Get the provisioningState value. + * Get gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. * * @return the provisioningState value */ @@ -323,7 +322,7 @@ public String provisioningState() { } /** - * Set the provisioningState value. + * Set gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. * * @param provisioningState the provisioningState value to set * @return the LoadBalancingRuleInner object itself. @@ -334,7 +333,7 @@ public LoadBalancingRuleInner withProvisioningState(String provisioningState) { } /** - * Get the name value. + * Get the name of the resource that is unique within a resource group. This name can be used to access the resource. * * @return the name value */ @@ -343,7 +342,7 @@ public String name() { } /** - * Set the name value. + * Set the name of the resource that is unique within a resource group. This name can be used to access the resource. * * @param name the name value to set * @return the LoadBalancingRuleInner object itself. @@ -354,7 +353,7 @@ public LoadBalancingRuleInner withName(String name) { } /** - * Get the etag value. + * Get a unique read-only string that changes whenever the resource is updated. * * @return the etag value */ @@ -363,7 +362,7 @@ public String etag() { } /** - * Set the etag value. + * Set a unique read-only string that changes whenever the resource is updated. * * @param etag the etag value to set * @return the LoadBalancingRuleInner object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LocalNetworkGatewayInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LocalNetworkGatewayInner.java index b3e3eaa84b9..239291547db 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LocalNetworkGatewayInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LocalNetworkGatewayInner.java @@ -12,12 +12,14 @@ import com.microsoft.azure.management.network.BgpSettings; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; import com.microsoft.azure.Resource; /** * A common class for general resource information. */ @JsonFlatten +@SkipParentValidation public class LocalNetworkGatewayInner extends Resource { /** * Local network site address space. @@ -57,7 +59,13 @@ public class LocalNetworkGatewayInner extends Resource { private String etag; /** - * Get the localNetworkAddressSpace value. + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get local network site address space. * * @return the localNetworkAddressSpace value */ @@ -66,7 +74,7 @@ public AddressSpace localNetworkAddressSpace() { } /** - * Set the localNetworkAddressSpace value. + * Set local network site address space. * * @param localNetworkAddressSpace the localNetworkAddressSpace value to set * @return the LocalNetworkGatewayInner object itself. @@ -77,7 +85,7 @@ public LocalNetworkGatewayInner withLocalNetworkAddressSpace(AddressSpace localN } /** - * Get the gatewayIpAddress value. + * Get iP address of local network gateway. * * @return the gatewayIpAddress value */ @@ -86,7 +94,7 @@ public String gatewayIpAddress() { } /** - * Set the gatewayIpAddress value. + * Set iP address of local network gateway. * * @param gatewayIpAddress the gatewayIpAddress value to set * @return the LocalNetworkGatewayInner object itself. @@ -97,7 +105,7 @@ public LocalNetworkGatewayInner withGatewayIpAddress(String gatewayIpAddress) { } /** - * Get the bgpSettings value. + * Get local network gateway's BGP speaker settings. * * @return the bgpSettings value */ @@ -106,7 +114,7 @@ public BgpSettings bgpSettings() { } /** - * Set the bgpSettings value. + * Set local network gateway's BGP speaker settings. * * @param bgpSettings the bgpSettings value to set * @return the LocalNetworkGatewayInner object itself. @@ -117,7 +125,7 @@ public LocalNetworkGatewayInner withBgpSettings(BgpSettings bgpSettings) { } /** - * Get the resourceGuid value. + * Get the resource GUID property of the LocalNetworkGateway resource. * * @return the resourceGuid value */ @@ -126,7 +134,7 @@ public String resourceGuid() { } /** - * Set the resourceGuid value. + * Set the resource GUID property of the LocalNetworkGateway resource. * * @param resourceGuid the resourceGuid value to set * @return the LocalNetworkGatewayInner object itself. @@ -137,7 +145,7 @@ public LocalNetworkGatewayInner withResourceGuid(String resourceGuid) { } /** - * Get the provisioningState value. + * Get the provisioning state of the LocalNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. * * @return the provisioningState value */ @@ -146,7 +154,7 @@ public String provisioningState() { } /** - * Get the etag value. + * Get a unique read-only string that changes whenever the resource is updated. * * @return the etag value */ @@ -155,7 +163,7 @@ public String etag() { } /** - * Set the etag value. + * Set a unique read-only string that changes whenever the resource is updated. * * @param etag the etag value to set * @return the LocalNetworkGatewayInner object itself. @@ -165,4 +173,24 @@ public LocalNetworkGatewayInner withEtag(String etag) { return this; } + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the LocalNetworkGatewayInner object itself. + */ + public LocalNetworkGatewayInner withId(String id) { + this.id = id; + return this; + } + } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LocalNetworkGatewaysInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LocalNetworkGatewaysInner.java index 04b8b7dc3f2..0decf765c48 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LocalNetworkGatewaysInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LocalNetworkGatewaysInner.java @@ -15,6 +15,7 @@ import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.network.TagsObject; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -23,12 +24,14 @@ import com.microsoft.rest.Validator; import java.io.IOException; import java.util.List; +import java.util.Map; import okhttp3.ResponseBody; import retrofit2.http.Body; import retrofit2.http.GET; import retrofit2.http.Header; import retrofit2.http.Headers; import retrofit2.http.HTTP; +import retrofit2.http.PATCH; import retrofit2.http.Path; import retrofit2.http.PUT; import retrofit2.http.Query; @@ -83,6 +86,14 @@ interface LocalNetworkGatewaysService { @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}", method = "DELETE", hasBody = true) Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("localNetworkGatewayName") String localNetworkGatewayName, @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.network.LocalNetworkGateways updateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}") + Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("localNetworkGatewayName") String localNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.LocalNetworkGateways beginUpdateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}") + Observable> beginUpdateTags(@Path("resourceGroupName") String resourceGroupName, @Path("localNetworkGatewayName") String localNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.LocalNetworkGateways listByResourceGroup" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways") Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -163,7 +174,7 @@ public Observable> createOrUpdateWithS throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.createOrUpdate(resourceGroupName, localNetworkGatewayName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -238,7 +249,7 @@ public Observable> beginCreateOrUpdate throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, localNetworkGatewayName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -255,8 +266,8 @@ public Observable> call(Response beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(201, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -323,7 +334,7 @@ public Observable> getByResourceGroupW if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.getByResourceGroup(resourceGroupName, localNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -406,7 +417,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.delete(resourceGroupName, localNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -472,7 +483,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, localNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -489,9 +500,323 @@ public Observable> call(Response response) { private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates a local network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param localNetworkGatewayName The name of the local network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the LocalNetworkGatewayInner object if successful. + */ + public LocalNetworkGatewayInner updateTags(String resourceGroupName, String localNetworkGatewayName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName).toBlocking().last().body(); + } + + /** + * Updates a local network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param localNetworkGatewayName The name of the local network gateway. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateTagsAsync(String resourceGroupName, String localNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName), serviceCallback); + } + + /** + * Updates a local network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param localNetworkGatewayName The name of the local network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateTagsAsync(String resourceGroupName, String localNetworkGatewayName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName).map(new Func1, LocalNetworkGatewayInner>() { + @Override + public LocalNetworkGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a local network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param localNetworkGatewayName The name of the local network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String localNetworkGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (localNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter localNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + Observable> observable = service.updateTags(resourceGroupName, localNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Updates a local network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param localNetworkGatewayName The name of the local network gateway. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the LocalNetworkGatewayInner object if successful. + */ + public LocalNetworkGatewayInner updateTags(String resourceGroupName, String localNetworkGatewayName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName, tags).toBlocking().last().body(); + } + + /** + * Updates a local network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param localNetworkGatewayName The name of the local network gateway. + * @param tags Resource tags. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateTagsAsync(String resourceGroupName, String localNetworkGatewayName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName, tags), serviceCallback); + } + + /** + * Updates a local network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param localNetworkGatewayName The name of the local network gateway. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateTagsAsync(String resourceGroupName, String localNetworkGatewayName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName, tags).map(new Func1, LocalNetworkGatewayInner>() { + @Override + public LocalNetworkGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a local network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param localNetworkGatewayName The name of the local network gateway. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String localNetworkGatewayName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (localNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter localNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + Observable> observable = service.updateTags(resourceGroupName, localNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Updates a local network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param localNetworkGatewayName The name of the local network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the LocalNetworkGatewayInner object if successful. + */ + public LocalNetworkGatewayInner beginUpdateTags(String resourceGroupName, String localNetworkGatewayName) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName).toBlocking().single().body(); + } + + /** + * Updates a local network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param localNetworkGatewayName The name of the local network gateway. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateTagsAsync(String resourceGroupName, String localNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName), serviceCallback); + } + + /** + * Updates a local network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param localNetworkGatewayName The name of the local network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LocalNetworkGatewayInner object + */ + public Observable beginUpdateTagsAsync(String resourceGroupName, String localNetworkGatewayName) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName).map(new Func1, LocalNetworkGatewayInner>() { + @Override + public LocalNetworkGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a local network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param localNetworkGatewayName The name of the local network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LocalNetworkGatewayInner object + */ + public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String localNetworkGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (localNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter localNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.beginUpdateTags(resourceGroupName, localNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates a local network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param localNetworkGatewayName The name of the local network gateway. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the LocalNetworkGatewayInner object if successful. + */ + public LocalNetworkGatewayInner beginUpdateTags(String resourceGroupName, String localNetworkGatewayName, Map tags) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName, tags).toBlocking().single().body(); + } + + /** + * Updates a local network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param localNetworkGatewayName The name of the local network gateway. + * @param tags Resource tags. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateTagsAsync(String resourceGroupName, String localNetworkGatewayName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName, tags), serviceCallback); + } + + /** + * Updates a local network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param localNetworkGatewayName The name of the local network gateway. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LocalNetworkGatewayInner object + */ + public Observable beginUpdateTagsAsync(String resourceGroupName, String localNetworkGatewayName, Map tags) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName, tags).map(new Func1, LocalNetworkGatewayInner>() { + @Override + public LocalNetworkGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a local network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param localNetworkGatewayName The name of the local network gateway. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LocalNetworkGatewayInner object + */ + public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String localNetworkGatewayName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (localNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter localNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.beginUpdateTags(resourceGroupName, localNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateTagsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -587,7 +912,7 @@ public Observable>> listByResourc if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceIPConfigurationInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceIPConfigurationInner.java index bed19881641..5bf3ae55374 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceIPConfigurationInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceIPConfigurationInner.java @@ -77,7 +77,13 @@ public class NetworkInterfaceIPConfigurationInner extends SubResource { * Public IP address bound to the IP configuration. */ @JsonProperty(value = "properties.publicIPAddress") - private SubResource publicIPAddress; + private PublicIPAddressInner publicIPAddress; + + /** + * Application security groups in which the IP configuration is included. + */ + @JsonProperty(value = "properties.applicationSecurityGroups") + private List applicationSecurityGroups; /** * The provisioning state of the network interface IP configuration. @@ -100,7 +106,7 @@ public class NetworkInterfaceIPConfigurationInner extends SubResource { private String etag; /** - * Get the applicationGatewayBackendAddressPools value. + * Get the reference of ApplicationGatewayBackendAddressPool resource. * * @return the applicationGatewayBackendAddressPools value */ @@ -109,7 +115,7 @@ public List applicationGatewayBackend } /** - * Set the applicationGatewayBackendAddressPools value. + * Set the reference of ApplicationGatewayBackendAddressPool resource. * * @param applicationGatewayBackendAddressPools the applicationGatewayBackendAddressPools value to set * @return the NetworkInterfaceIPConfigurationInner object itself. @@ -120,7 +126,7 @@ public NetworkInterfaceIPConfigurationInner withApplicationGatewayBackendAddress } /** - * Get the loadBalancerBackendAddressPools value. + * Get the reference of LoadBalancerBackendAddressPool resource. * * @return the loadBalancerBackendAddressPools value */ @@ -129,7 +135,7 @@ public List loadBalancerBackendAddressPools() { } /** - * Set the loadBalancerBackendAddressPools value. + * Set the reference of LoadBalancerBackendAddressPool resource. * * @param loadBalancerBackendAddressPools the loadBalancerBackendAddressPools value to set * @return the NetworkInterfaceIPConfigurationInner object itself. @@ -140,7 +146,7 @@ public NetworkInterfaceIPConfigurationInner withLoadBalancerBackendAddressPools( } /** - * Get the loadBalancerInboundNatRules value. + * Get a list of references of LoadBalancerInboundNatRules. * * @return the loadBalancerInboundNatRules value */ @@ -149,7 +155,7 @@ public List loadBalancerInboundNatRules() { } /** - * Set the loadBalancerInboundNatRules value. + * Set a list of references of LoadBalancerInboundNatRules. * * @param loadBalancerInboundNatRules the loadBalancerInboundNatRules value to set * @return the NetworkInterfaceIPConfigurationInner object itself. @@ -160,7 +166,7 @@ public NetworkInterfaceIPConfigurationInner withLoadBalancerInboundNatRules(List } /** - * Get the privateIPAddress value. + * Get private IP address of the IP configuration. * * @return the privateIPAddress value */ @@ -169,7 +175,7 @@ public String privateIPAddress() { } /** - * Set the privateIPAddress value. + * Set private IP address of the IP configuration. * * @param privateIPAddress the privateIPAddress value to set * @return the NetworkInterfaceIPConfigurationInner object itself. @@ -180,7 +186,7 @@ public NetworkInterfaceIPConfigurationInner withPrivateIPAddress(String privateI } /** - * Get the privateIPAllocationMethod value. + * Get defines how a private IP address is assigned. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'. * * @return the privateIPAllocationMethod value */ @@ -189,7 +195,7 @@ public IPAllocationMethod privateIPAllocationMethod() { } /** - * Set the privateIPAllocationMethod value. + * Set defines how a private IP address is assigned. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'. * * @param privateIPAllocationMethod the privateIPAllocationMethod value to set * @return the NetworkInterfaceIPConfigurationInner object itself. @@ -200,7 +206,7 @@ public NetworkInterfaceIPConfigurationInner withPrivateIPAllocationMethod(IPAllo } /** - * Get the privateIPAddressVersion value. + * Get available from Api-Version 2016-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'. * * @return the privateIPAddressVersion value */ @@ -209,7 +215,7 @@ public IPVersion privateIPAddressVersion() { } /** - * Set the privateIPAddressVersion value. + * Set available from Api-Version 2016-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'. * * @param privateIPAddressVersion the privateIPAddressVersion value to set * @return the NetworkInterfaceIPConfigurationInner object itself. @@ -220,7 +226,7 @@ public NetworkInterfaceIPConfigurationInner withPrivateIPAddressVersion(IPVersio } /** - * Get the subnet value. + * Get subnet bound to the IP configuration. * * @return the subnet value */ @@ -229,7 +235,7 @@ public SubnetInner subnet() { } /** - * Set the subnet value. + * Set subnet bound to the IP configuration. * * @param subnet the subnet value to set * @return the NetworkInterfaceIPConfigurationInner object itself. @@ -240,7 +246,7 @@ public NetworkInterfaceIPConfigurationInner withSubnet(SubnetInner subnet) { } /** - * Get the primary value. + * Get gets whether this is a primary customer address on the network interface. * * @return the primary value */ @@ -249,7 +255,7 @@ public Boolean primary() { } /** - * Set the primary value. + * Set gets whether this is a primary customer address on the network interface. * * @param primary the primary value to set * @return the NetworkInterfaceIPConfigurationInner object itself. @@ -260,27 +266,47 @@ public NetworkInterfaceIPConfigurationInner withPrimary(Boolean primary) { } /** - * Get the publicIPAddress value. + * Get public IP address bound to the IP configuration. * * @return the publicIPAddress value */ - public SubResource publicIPAddress() { + public PublicIPAddressInner publicIPAddress() { return this.publicIPAddress; } /** - * Set the publicIPAddress value. + * Set public IP address bound to the IP configuration. * * @param publicIPAddress the publicIPAddress value to set * @return the NetworkInterfaceIPConfigurationInner object itself. */ - public NetworkInterfaceIPConfigurationInner withPublicIPAddress(SubResource publicIPAddress) { + public NetworkInterfaceIPConfigurationInner withPublicIPAddress(PublicIPAddressInner publicIPAddress) { this.publicIPAddress = publicIPAddress; return this; } /** - * Get the provisioningState value. + * Get application security groups in which the IP configuration is included. + * + * @return the applicationSecurityGroups value + */ + public List applicationSecurityGroups() { + return this.applicationSecurityGroups; + } + + /** + * Set application security groups in which the IP configuration is included. + * + * @param applicationSecurityGroups the applicationSecurityGroups value to set + * @return the NetworkInterfaceIPConfigurationInner object itself. + */ + public NetworkInterfaceIPConfigurationInner withApplicationSecurityGroups(List applicationSecurityGroups) { + this.applicationSecurityGroups = applicationSecurityGroups; + return this; + } + + /** + * Get the provisioning state of the network interface IP configuration. Possible values are: 'Updating', 'Deleting', and 'Failed'. * * @return the provisioningState value */ @@ -289,7 +315,7 @@ public String provisioningState() { } /** - * Set the provisioningState value. + * Set the provisioning state of the network interface IP configuration. Possible values are: 'Updating', 'Deleting', and 'Failed'. * * @param provisioningState the provisioningState value to set * @return the NetworkInterfaceIPConfigurationInner object itself. @@ -300,7 +326,7 @@ public NetworkInterfaceIPConfigurationInner withProvisioningState(String provisi } /** - * Get the name value. + * Get the name of the resource that is unique within a resource group. This name can be used to access the resource. * * @return the name value */ @@ -309,7 +335,7 @@ public String name() { } /** - * Set the name value. + * Set the name of the resource that is unique within a resource group. This name can be used to access the resource. * * @param name the name value to set * @return the NetworkInterfaceIPConfigurationInner object itself. @@ -320,7 +346,7 @@ public NetworkInterfaceIPConfigurationInner withName(String name) { } /** - * Get the etag value. + * Get a unique read-only string that changes whenever the resource is updated. * * @return the etag value */ @@ -329,7 +355,7 @@ public String etag() { } /** - * Set the etag value. + * Set a unique read-only string that changes whenever the resource is updated. * * @param etag the etag value to set * @return the NetworkInterfaceIPConfigurationInner object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceIPConfigurationsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceIPConfigurationsInner.java index 7b2885e8974..48e2989989c 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceIPConfigurationsInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceIPConfigurationsInner.java @@ -170,7 +170,7 @@ public Observable>> l if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -261,7 +261,7 @@ public Observable> getWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.get(resourceGroupName, networkInterfaceName, ipConfigurationName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceInner.java index 52602144686..036bd8f6377 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceInner.java @@ -13,12 +13,14 @@ import com.microsoft.azure.management.network.NetworkInterfaceDnsSettings; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; import com.microsoft.azure.Resource; /** * A network interface in a resource group. */ @JsonFlatten +@SkipParentValidation public class NetworkInterfaceInner extends Resource { /** * The reference of a virtual machine. @@ -30,7 +32,7 @@ public class NetworkInterfaceInner extends Resource { * The reference of the NetworkSecurityGroup resource. */ @JsonProperty(value = "properties.networkSecurityGroup") - private SubResource networkSecurityGroup; + private NetworkSecurityGroupInner networkSecurityGroup; /** * A list of IPConfigurations of the network interface. @@ -88,7 +90,13 @@ public class NetworkInterfaceInner extends Resource { private String etag; /** - * Get the virtualMachine value. + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get the reference of a virtual machine. * * @return the virtualMachine value */ @@ -97,7 +105,7 @@ public SubResource virtualMachine() { } /** - * Set the virtualMachine value. + * Set the reference of a virtual machine. * * @param virtualMachine the virtualMachine value to set * @return the NetworkInterfaceInner object itself. @@ -108,27 +116,27 @@ public NetworkInterfaceInner withVirtualMachine(SubResource virtualMachine) { } /** - * Get the networkSecurityGroup value. + * Get the reference of the NetworkSecurityGroup resource. * * @return the networkSecurityGroup value */ - public SubResource networkSecurityGroup() { + public NetworkSecurityGroupInner networkSecurityGroup() { return this.networkSecurityGroup; } /** - * Set the networkSecurityGroup value. + * Set the reference of the NetworkSecurityGroup resource. * * @param networkSecurityGroup the networkSecurityGroup value to set * @return the NetworkInterfaceInner object itself. */ - public NetworkInterfaceInner withNetworkSecurityGroup(SubResource networkSecurityGroup) { + public NetworkInterfaceInner withNetworkSecurityGroup(NetworkSecurityGroupInner networkSecurityGroup) { this.networkSecurityGroup = networkSecurityGroup; return this; } /** - * Get the ipConfigurations value. + * Get a list of IPConfigurations of the network interface. * * @return the ipConfigurations value */ @@ -137,7 +145,7 @@ public List ipConfigurations() { } /** - * Set the ipConfigurations value. + * Set a list of IPConfigurations of the network interface. * * @param ipConfigurations the ipConfigurations value to set * @return the NetworkInterfaceInner object itself. @@ -148,7 +156,7 @@ public NetworkInterfaceInner withIpConfigurations(List nextPage(String nextPageLink) { } /** - * Get all load balancers in a network interface. + * List all load balancers in a network interface. * * @param resourceGroupName The name of the resource group. * @param networkInterfaceName The name of the network interface. @@ -108,7 +108,7 @@ public Observable>> call(String nextPage } /** - * Get all load balancers in a network interface. + * List all load balancers in a network interface. * * @param resourceGroupName The name of the resource group. * @param networkInterfaceName The name of the network interface. @@ -126,7 +126,7 @@ public Page call(ServiceResponse> res } /** - * Get all load balancers in a network interface. + * List all load balancers in a network interface. * * @param resourceGroupName The name of the resource group. * @param networkInterfaceName The name of the network interface. @@ -148,7 +148,7 @@ public Observable>> call(ServiceResponse } /** - * Get all load balancers in a network interface. + * List all load balancers in a network interface. * ServiceResponse> * @param resourceGroupName The name of the resource group. ServiceResponse> * @param networkInterfaceName The name of the network interface. @@ -165,7 +165,7 @@ public Observable>> listSinglePageAsync( if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -188,7 +188,7 @@ private ServiceResponse> listDelegate(Response nextPage(String nextPageLink) { } /** - * Get all load balancers in a network interface. + * List all load balancers in a network interface. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceFuture the ServiceFuture object tracking the Retrofit calls @@ -228,7 +228,7 @@ public Observable>> call(String nextPage } /** - * Get all load balancers in a network interface. + * List all load balancers in a network interface. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -245,7 +245,7 @@ public Page call(ServiceResponse> res } /** - * Get all load balancers in a network interface. + * List all load balancers in a network interface. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -266,7 +266,7 @@ public Observable>> call(ServiceResponse } /** - * Get all load balancers in a network interface. + * List all load balancers in a network interface. * ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfacesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfacesInner.java index fe2aae7bb84..3341a83a146 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfacesInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfacesInner.java @@ -16,6 +16,7 @@ import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.network.TagsObject; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -24,12 +25,14 @@ import com.microsoft.rest.Validator; import java.io.IOException; import java.util.List; +import java.util.Map; import okhttp3.ResponseBody; import retrofit2.http.Body; import retrofit2.http.GET; import retrofit2.http.Header; import retrofit2.http.Headers; import retrofit2.http.HTTP; +import retrofit2.http.PATCH; import retrofit2.http.Path; import retrofit2.http.POST; import retrofit2.http.PUT; @@ -85,6 +88,14 @@ interface NetworkInterfacesService { @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}") Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("networkInterfaceName") String networkInterfaceName, @Path("subscriptionId") String subscriptionId, @Body NetworkInterfaceInner 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.network.NetworkInterfaces updateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}") + Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("networkInterfaceName") String networkInterfaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.NetworkInterfaces beginUpdateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}") + Observable> beginUpdateTags(@Path("resourceGroupName") String resourceGroupName, @Path("networkInterfaceName") String networkInterfaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.NetworkInterfaces list" }) @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/networkInterfaces") Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -121,6 +132,14 @@ interface NetworkInterfacesService { @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}") Observable> getVirtualMachineScaleSetNetworkInterface(@Path("resourceGroupName") String resourceGroupName, @Path("virtualMachineScaleSetName") String virtualMachineScaleSetName, @Path("virtualmachineIndex") String virtualmachineIndex, @Path("networkInterfaceName") String networkInterfaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$expand") String expand, @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.network.NetworkInterfaces listVirtualMachineScaleSetIpConfigurations" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipConfigurations") + Observable> listVirtualMachineScaleSetIpConfigurations(@Path("resourceGroupName") String resourceGroupName, @Path("virtualMachineScaleSetName") String virtualMachineScaleSetName, @Path("virtualmachineIndex") String virtualmachineIndex, @Path("networkInterfaceName") String networkInterfaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$expand") String expand, @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.network.NetworkInterfaces getVirtualMachineScaleSetIpConfiguration" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipConfigurations/{ipConfigurationName}") + Observable> getVirtualMachineScaleSetIpConfiguration(@Path("resourceGroupName") String resourceGroupName, @Path("virtualMachineScaleSetName") String virtualMachineScaleSetName, @Path("virtualmachineIndex") String virtualmachineIndex, @Path("networkInterfaceName") String networkInterfaceName, @Path("ipConfigurationName") String ipConfigurationName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$expand") String expand, @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.network.NetworkInterfaces listNext" }) @GET Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -129,22 +148,6 @@ interface NetworkInterfacesService { @GET Observable> listByResourceGroupNext(@Url String nextUrl, @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.network.NetworkInterfaces getEffectiveRouteTableNext" }) - @GET - Observable> getEffectiveRouteTableNext(@Url String nextUrl, @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.network.NetworkInterfaces beginGetEffectiveRouteTableNext" }) - @GET - Observable> beginGetEffectiveRouteTableNext(@Url String nextUrl, @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.network.NetworkInterfaces listEffectiveNetworkSecurityGroupsNext" }) - @GET - Observable> listEffectiveNetworkSecurityGroupsNext(@Url String nextUrl, @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.network.NetworkInterfaces beginListEffectiveNetworkSecurityGroupsNext" }) - @GET - Observable> beginListEffectiveNetworkSecurityGroupsNext(@Url String nextUrl, @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.network.NetworkInterfaces listVirtualMachineScaleSetVMNetworkInterfacesNext" }) @GET Observable> listVirtualMachineScaleSetVMNetworkInterfacesNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -153,6 +156,10 @@ interface NetworkInterfacesService { @GET Observable> listVirtualMachineScaleSetNetworkInterfacesNext(@Url String nextUrl, @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.network.NetworkInterfaces listVirtualMachineScaleSetIpConfigurationsNext" }) + @GET + Observable> listVirtualMachineScaleSetIpConfigurationsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + } /** @@ -216,7 +223,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.delete(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -282,7 +289,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -299,9 +306,9 @@ public Observable> call(Response response) { private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -368,7 +375,7 @@ public Observable> getByResourceGroupWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; final String expand = null; return service.getByResourceGroup(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -450,7 +457,7 @@ public Observable> getByResourceGroupWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.getByResourceGroup(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -542,7 +549,7 @@ public Observable> createOrUpdateWithServ throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.createOrUpdate(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -617,7 +624,7 @@ public Observable> beginCreateOrUpdateWit throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -634,252 +641,171 @@ public Observable> call(Response beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(201, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets all network interfaces in a subscription. + * Updates a network interface tags. * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<NetworkInterfaceInner> object if successful. + * @return the NetworkInterfaceInner object if successful. */ - public PagedList list() { - ServiceResponse> response = listSinglePageAsync().toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; + public NetworkInterfaceInner updateTags(String resourceGroupName, String networkInterfaceName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, networkInterfaceName).toBlocking().last().body(); } /** - * Gets all network interfaces in a subscription. + * Updates a network interface tags. * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all network interfaces in a subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NetworkInterfaceInner> object - */ - public Observable> listAsync() { - return listWithServiceResponseAsync() - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); + public ServiceFuture updateTagsAsync(String resourceGroupName, String networkInterfaceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, networkInterfaceName), serviceCallback); } /** - * Gets all network interfaces in a subscription. + * Updates a network interface tags. * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NetworkInterfaceInner> object + * @return the observable for the request */ - public Observable>> listWithServiceResponseAsync() { - return listSinglePageAsync() - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); + public Observable updateTagsAsync(String resourceGroupName, String networkInterfaceName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, networkInterfaceName).map(new Func1, NetworkInterfaceInner>() { + @Override + public NetworkInterfaceInner call(ServiceResponse response) { + return response.body(); + } + }); } /** - * Gets all network interfaces in a subscription. + * Updates a network interface tags. * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<NetworkInterfaceInner> object wrapped in {@link ServiceResponse} if successful. + * @return the observable for the request */ - public Observable>> listSinglePageAsync() { + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkInterfaceName == null) { + throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; - return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + Observable> observable = service.updateTags(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } - /** - * Gets all network interfaces in a resource group. + * Updates a network interface tags. * * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param tags Resource tags. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<NetworkInterfaceInner> object if successful. + * @return the NetworkInterfaceInner object if successful. */ - public PagedList listByResourceGroup(final String resourceGroupName) { - ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; + public NetworkInterfaceInner updateTags(String resourceGroupName, String networkInterfaceName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, networkInterfaceName, tags).toBlocking().last().body(); } /** - * Gets all network interfaces in a resource group. + * Updates a network interface tags. * * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param tags Resource tags. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupSinglePageAsync(resourceGroupName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); + public ServiceFuture updateTagsAsync(String resourceGroupName, String networkInterfaceName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, networkInterfaceName, tags), serviceCallback); } /** - * Gets all network interfaces in a resource group. + * Updates a network interface tags. * * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param tags Resource tags. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NetworkInterfaceInner> object + * @return the observable for the request */ - public Observable> listByResourceGroupAsync(final String resourceGroupName) { - return listByResourceGroupWithServiceResponseAsync(resourceGroupName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); + public Observable updateTagsAsync(String resourceGroupName, String networkInterfaceName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, networkInterfaceName, tags).map(new Func1, NetworkInterfaceInner>() { + @Override + public NetworkInterfaceInner call(ServiceResponse response) { + return response.body(); + } + }); } /** - * Gets all network interfaces in a resource group. + * Updates a network interface tags. * * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param tags Resource tags. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NetworkInterfaceInner> object - */ - public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { - return listByResourceGroupSinglePageAsync(resourceGroupName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all network interfaces in a resource group. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<NetworkInterfaceInner> object wrapped in {@link ServiceResponse} if successful. + * @return the observable for the request */ - public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName, Map tags) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } + if (networkInterfaceName == null) { + throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; - return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + Observable> observable = service.updateTags(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } /** - * Gets all route tables applied to a network interface. + * Updates a network interface tags. * * @param resourceGroupName The name of the resource group. * @param networkInterfaceName The name of the network interface. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<EffectiveRouteInner> object if successful. + * @return the NetworkInterfaceInner object if successful. */ - public PagedList getEffectiveRouteTable(final String resourceGroupName, final String networkInterfaceName) { - ServiceResponse> response = getEffectiveRouteTableSinglePageAsync(resourceGroupName, networkInterfaceName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return getEffectiveRouteTableNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; + public NetworkInterfaceInner beginUpdateTags(String resourceGroupName, String networkInterfaceName) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, networkInterfaceName).toBlocking().single().body(); } /** - * Gets all route tables applied to a network interface. + * Updates a network interface tags. * * @param resourceGroupName The name of the resource group. * @param networkInterfaceName The name of the network interface. @@ -887,67 +813,36 @@ public Page nextPage(String nextPageLink) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> getEffectiveRouteTableAsync(final String resourceGroupName, final String networkInterfaceName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - getEffectiveRouteTableSinglePageAsync(resourceGroupName, networkInterfaceName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getEffectiveRouteTableNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); + public ServiceFuture beginUpdateTagsAsync(String resourceGroupName, String networkInterfaceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, networkInterfaceName), serviceCallback); } /** - * Gets all route tables applied to a network interface. + * Updates a network interface tags. * * @param resourceGroupName The name of the resource group. * @param networkInterfaceName The name of the network interface. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<EffectiveRouteInner> object + * @return the observable to the NetworkInterfaceInner object */ - public Observable> getEffectiveRouteTableAsync(final String resourceGroupName, final String networkInterfaceName) { - return getEffectiveRouteTableWithServiceResponseAsync(resourceGroupName, networkInterfaceName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); + public Observable beginUpdateTagsAsync(String resourceGroupName, String networkInterfaceName) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, networkInterfaceName).map(new Func1, NetworkInterfaceInner>() { + @Override + public NetworkInterfaceInner call(ServiceResponse response) { + return response.body(); + } + }); } /** - * Gets all route tables applied to a network interface. + * Updates a network interface tags. * * @param resourceGroupName The name of the resource group. * @param networkInterfaceName The name of the network interface. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<EffectiveRouteInner> object - */ - public Observable>> getEffectiveRouteTableWithServiceResponseAsync(final String resourceGroupName, final String networkInterfaceName) { - return getEffectiveRouteTableSinglePageAsync(resourceGroupName, networkInterfaceName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getEffectiveRouteTableNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all route tables applied to a network interface. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param networkInterfaceName The name of the network interface. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<EffectiveRouteInner> object wrapped in {@link ServiceResponse} if successful. + * @return the observable to the NetworkInterfaceInner object */ - public Observable>> getEffectiveRouteTableSinglePageAsync(final String resourceGroupName, final String networkInterfaceName) { + public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -957,14 +852,17 @@ public Observable>> getEffectiveRouteT if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; - return service.getEffectiveRouteTable(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.beginUpdateTags(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable>> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse> result = getEffectiveRouteTableDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); + ServiceResponse clientResponse = beginUpdateTagsDelegate(response); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -972,121 +870,188 @@ public Observable>> call(Response> getEffectiveRouteTableDelegate(Response response) throws CloudException, IOException, IllegalArgumentException, InterruptedException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - /** - * Gets all route tables applied to a network interface. + * Updates a network interface tags. * * @param resourceGroupName The name of the resource group. * @param networkInterfaceName The name of the network interface. + * @param tags Resource tags. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<EffectiveRouteInner> object if successful. + * @return the NetworkInterfaceInner object if successful. */ - public PagedList beginGetEffectiveRouteTable(final String resourceGroupName, final String networkInterfaceName) { - ServiceResponse> response = beginGetEffectiveRouteTableSinglePageAsync(resourceGroupName, networkInterfaceName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return beginGetEffectiveRouteTableNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + public NetworkInterfaceInner beginUpdateTags(String resourceGroupName, String networkInterfaceName, Map tags) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, networkInterfaceName, tags).toBlocking().single().body(); + } + + /** + * Updates a network interface tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param tags Resource tags. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateTagsAsync(String resourceGroupName, String networkInterfaceName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, networkInterfaceName, tags), serviceCallback); + } + + /** + * Updates a network interface tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkInterfaceInner object + */ + public Observable beginUpdateTagsAsync(String resourceGroupName, String networkInterfaceName, Map tags) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, networkInterfaceName, tags).map(new Func1, NetworkInterfaceInner>() { + @Override + public NetworkInterfaceInner call(ServiceResponse response) { + return response.body(); } - }; + }); } /** - * Gets all route tables applied to a network interface. + * Updates a network interface tags. * * @param resourceGroupName The name of the resource group. * @param networkInterfaceName The name of the network interface. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkInterfaceInner object + */ + public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkInterfaceName == null) { + throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.beginUpdateTags(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateTagsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets all network interfaces in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<NetworkInterfaceInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all network interfaces in a subscription. + * * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> beginGetEffectiveRouteTableAsync(final String resourceGroupName, final String networkInterfaceName, final ListOperationCallback serviceCallback) { + public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( - beginGetEffectiveRouteTableSinglePageAsync(resourceGroupName, networkInterfaceName), - new Func1>>>() { + listSinglePageAsync(), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return beginGetEffectiveRouteTableNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Gets all route tables applied to a network interface. + * Gets all network interfaces in a subscription. * - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<EffectiveRouteInner> object + * @return the observable to the PagedList<NetworkInterfaceInner> object */ - public Observable> beginGetEffectiveRouteTableAsync(final String resourceGroupName, final String networkInterfaceName) { - return beginGetEffectiveRouteTableWithServiceResponseAsync(resourceGroupName, networkInterfaceName) - .map(new Func1>, Page>() { + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.body(); } }); } /** - * Gets all route tables applied to a network interface. + * Gets all network interfaces in a subscription. * - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<EffectiveRouteInner> object + * @return the observable to the PagedList<NetworkInterfaceInner> object */ - public Observable>> beginGetEffectiveRouteTableWithServiceResponseAsync(final String resourceGroupName, final String networkInterfaceName) { - return beginGetEffectiveRouteTableSinglePageAsync(resourceGroupName, networkInterfaceName) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(beginGetEffectiveRouteTableNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Gets all route tables applied to a network interface. + * Gets all network interfaces in a subscription. * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param networkInterfaceName The name of the network interface. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<EffectiveRouteInner> object wrapped in {@link ServiceResponse} if successful. + * @return the PagedList<NetworkInterfaceInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> beginGetEffectiveRouteTableSinglePageAsync(final String resourceGroupName, final String networkInterfaceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (networkInterfaceName == null) { - throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null."); - } + public Observable>> listSinglePageAsync() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; - return service.beginGetEffectiveRouteTable(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + final String apiVersion = "2018-04-01"; + return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = beginGetEffectiveRouteTableDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } @@ -1094,104 +1059,179 @@ public Observable>> call(Response> beginGetEffectiveRouteTableDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .register(202, new TypeToken() { }.getType()) + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets all network security groups applied to a network interface. + * Gets all network interfaces in a resource group. * * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<EffectiveNetworkSecurityGroupInner> object if successful. + * @return the PagedList<NetworkInterfaceInner> object if successful. */ - public PagedList listEffectiveNetworkSecurityGroups(final String resourceGroupName, final String networkInterfaceName) { - ServiceResponse> response = listEffectiveNetworkSecurityGroupsSinglePageAsync(resourceGroupName, networkInterfaceName).toBlocking().single(); - return new PagedList(response.body()) { + public PagedList listByResourceGroup(final String resourceGroupName) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); + return new PagedList(response.body()) { @Override - public Page nextPage(String nextPageLink) { - return listEffectiveNetworkSecurityGroupsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; } /** - * Gets all network security groups applied to a network interface. + * Gets all network interfaces in a resource group. * * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listEffectiveNetworkSecurityGroupsAsync(final String resourceGroupName, final String networkInterfaceName, final ListOperationCallback serviceCallback) { + public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( - listEffectiveNetworkSecurityGroupsSinglePageAsync(resourceGroupName, networkInterfaceName), - new Func1>>>() { + listByResourceGroupSinglePageAsync(resourceGroupName), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return listEffectiveNetworkSecurityGroupsNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Gets all network security groups applied to a network interface. + * Gets all network interfaces in a resource group. * * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<EffectiveNetworkSecurityGroupInner> object + * @return the observable to the PagedList<NetworkInterfaceInner> object */ - public Observable> listEffectiveNetworkSecurityGroupsAsync(final String resourceGroupName, final String networkInterfaceName) { - return listEffectiveNetworkSecurityGroupsWithServiceResponseAsync(resourceGroupName, networkInterfaceName) - .map(new Func1>, Page>() { + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.body(); } }); } /** - * Gets all network security groups applied to a network interface. + * Gets all network interfaces in a resource group. * * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<EffectiveNetworkSecurityGroupInner> object + * @return the observable to the PagedList<NetworkInterfaceInner> object */ - public Observable>> listEffectiveNetworkSecurityGroupsWithServiceResponseAsync(final String resourceGroupName, final String networkInterfaceName) { - return listEffectiveNetworkSecurityGroupsSinglePageAsync(resourceGroupName, networkInterfaceName) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { + return listByResourceGroupSinglePageAsync(resourceGroupName) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(listEffectiveNetworkSecurityGroupsNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Gets all network security groups applied to a network interface. + * Gets all network interfaces in a resource group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<NetworkInterfaceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets all route tables applied to a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the EffectiveRouteListResultInner object if successful. + */ + public EffectiveRouteListResultInner getEffectiveRouteTable(String resourceGroupName, String networkInterfaceName) { + return getEffectiveRouteTableWithServiceResponseAsync(resourceGroupName, networkInterfaceName).toBlocking().last().body(); + } + + /** + * Gets all route tables applied to a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getEffectiveRouteTableAsync(String resourceGroupName, String networkInterfaceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getEffectiveRouteTableWithServiceResponseAsync(resourceGroupName, networkInterfaceName), serviceCallback); + } + + /** + * Gets all route tables applied to a network interface. * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param networkInterfaceName The name of the network interface. + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<EffectiveNetworkSecurityGroupInner> object wrapped in {@link ServiceResponse} if successful. + * @return the observable for the request + */ + public Observable getEffectiveRouteTableAsync(String resourceGroupName, String networkInterfaceName) { + return getEffectiveRouteTableWithServiceResponseAsync(resourceGroupName, networkInterfaceName).map(new Func1, EffectiveRouteListResultInner>() { + @Override + public EffectiveRouteListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets all route tables applied to a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request */ - public Observable>> listEffectiveNetworkSecurityGroupsSinglePageAsync(final String resourceGroupName, final String networkInterfaceName) { + public Observable> getEffectiveRouteTableWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1201,14 +1241,81 @@ public Observable>> lis if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; - return service.listEffectiveNetworkSecurityGroups(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + final String apiVersion = "2018-04-01"; + Observable> observable = service.getEffectiveRouteTable(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Gets all route tables applied to a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the EffectiveRouteListResultInner object if successful. + */ + public EffectiveRouteListResultInner beginGetEffectiveRouteTable(String resourceGroupName, String networkInterfaceName) { + return beginGetEffectiveRouteTableWithServiceResponseAsync(resourceGroupName, networkInterfaceName).toBlocking().single().body(); + } + + /** + * Gets all route tables applied to a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginGetEffectiveRouteTableAsync(String resourceGroupName, String networkInterfaceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginGetEffectiveRouteTableWithServiceResponseAsync(resourceGroupName, networkInterfaceName), serviceCallback); + } + + /** + * Gets all route tables applied to a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the EffectiveRouteListResultInner object + */ + public Observable beginGetEffectiveRouteTableAsync(String resourceGroupName, String networkInterfaceName) { + return beginGetEffectiveRouteTableWithServiceResponseAsync(resourceGroupName, networkInterfaceName).map(new Func1, EffectiveRouteListResultInner>() { + @Override + public EffectiveRouteListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets all route tables applied to a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the EffectiveRouteListResultInner object + */ + public Observable> beginGetEffectiveRouteTableWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkInterfaceName == null) { + throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + return service.beginGetEffectiveRouteTable(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable>> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse> result = listEffectiveNetworkSecurityGroupsDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); + ServiceResponse clientResponse = beginGetEffectiveRouteTableDelegate(response); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -1216,9 +1323,9 @@ public Observable>> cal }); } - private ServiceResponse> listEffectiveNetworkSecurityGroupsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException, InterruptedException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse beginGetEffectiveRouteTableDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1232,16 +1339,10 @@ private ServiceResponse> listEffect * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<EffectiveNetworkSecurityGroupInner> object if successful. + * @return the EffectiveNetworkSecurityGroupListResultInner object if successful. */ - public PagedList beginListEffectiveNetworkSecurityGroups(final String resourceGroupName, final String networkInterfaceName) { - ServiceResponse> response = beginListEffectiveNetworkSecurityGroupsSinglePageAsync(resourceGroupName, networkInterfaceName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return beginListEffectiveNetworkSecurityGroupsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; + public EffectiveNetworkSecurityGroupListResultInner listEffectiveNetworkSecurityGroups(String resourceGroupName, String networkInterfaceName) { + return listEffectiveNetworkSecurityGroupsWithServiceResponseAsync(resourceGroupName, networkInterfaceName).toBlocking().last().body(); } /** @@ -1253,16 +1354,62 @@ public Page nextPage(String nextPageLink) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> beginListEffectiveNetworkSecurityGroupsAsync(final String resourceGroupName, final String networkInterfaceName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - beginListEffectiveNetworkSecurityGroupsSinglePageAsync(resourceGroupName, networkInterfaceName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return beginListEffectiveNetworkSecurityGroupsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); + public ServiceFuture listEffectiveNetworkSecurityGroupsAsync(String resourceGroupName, String networkInterfaceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listEffectiveNetworkSecurityGroupsWithServiceResponseAsync(resourceGroupName, networkInterfaceName), serviceCallback); + } + + /** + * Gets all network security groups applied to a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable listEffectiveNetworkSecurityGroupsAsync(String resourceGroupName, String networkInterfaceName) { + return listEffectiveNetworkSecurityGroupsWithServiceResponseAsync(resourceGroupName, networkInterfaceName).map(new Func1, EffectiveNetworkSecurityGroupListResultInner>() { + @Override + public EffectiveNetworkSecurityGroupListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets all network security groups applied to a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> listEffectiveNetworkSecurityGroupsWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkInterfaceName == null) { + throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + Observable> observable = service.listEffectiveNetworkSecurityGroups(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Gets all network security groups applied to a network interface. + * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the EffectiveNetworkSecurityGroupListResultInner object if successful. + */ + public EffectiveNetworkSecurityGroupListResultInner beginListEffectiveNetworkSecurityGroups(String resourceGroupName, String networkInterfaceName) { + return beginListEffectiveNetworkSecurityGroupsWithServiceResponseAsync(resourceGroupName, networkInterfaceName).toBlocking().single().body(); } /** @@ -1270,17 +1417,12 @@ public Observable>> cal * * @param resourceGroupName The name of the resource group. * @param networkInterfaceName The name of the network interface. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<EffectiveNetworkSecurityGroupInner> object + * @return the {@link ServiceFuture} object */ - public Observable> beginListEffectiveNetworkSecurityGroupsAsync(final String resourceGroupName, final String networkInterfaceName) { - return beginListEffectiveNetworkSecurityGroupsWithServiceResponseAsync(resourceGroupName, networkInterfaceName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); + public ServiceFuture beginListEffectiveNetworkSecurityGroupsAsync(String resourceGroupName, String networkInterfaceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginListEffectiveNetworkSecurityGroupsWithServiceResponseAsync(resourceGroupName, networkInterfaceName), serviceCallback); } /** @@ -1289,31 +1431,26 @@ public Page call(ServiceResponse>> beginListEffectiveNetworkSecurityGroupsWithServiceResponseAsync(final String resourceGroupName, final String networkInterfaceName) { - return beginListEffectiveNetworkSecurityGroupsSinglePageAsync(resourceGroupName, networkInterfaceName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(beginListEffectiveNetworkSecurityGroupsNextWithServiceResponseAsync(nextPageLink)); - } - }); + public Observable beginListEffectiveNetworkSecurityGroupsAsync(String resourceGroupName, String networkInterfaceName) { + return beginListEffectiveNetworkSecurityGroupsWithServiceResponseAsync(resourceGroupName, networkInterfaceName).map(new Func1, EffectiveNetworkSecurityGroupListResultInner>() { + @Override + public EffectiveNetworkSecurityGroupListResultInner call(ServiceResponse response) { + return response.body(); + } + }); } /** * Gets all network security groups applied to a network interface. * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param networkInterfaceName The name of the network interface. + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<EffectiveNetworkSecurityGroupInner> object wrapped in {@link ServiceResponse} if successful. + * @return the observable to the EffectiveNetworkSecurityGroupListResultInner object */ - public Observable>> beginListEffectiveNetworkSecurityGroupsSinglePageAsync(final String resourceGroupName, final String networkInterfaceName) { + public Observable> beginListEffectiveNetworkSecurityGroupsWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1323,14 +1460,14 @@ public Observable>> beg if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginListEffectiveNetworkSecurityGroups(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable>> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse> result = beginListEffectiveNetworkSecurityGroupsDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); + ServiceResponse clientResponse = beginListEffectiveNetworkSecurityGroupsDelegate(response); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -1338,9 +1475,9 @@ public Observable>> cal }); } - private ServiceResponse> beginListEffectiveNetworkSecurityGroupsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse beginListEffectiveNetworkSecurityGroupsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1791,102 +1928,129 @@ private ServiceResponse getVirtualMachineScaleSetNetworkI } /** - * Gets all network interfaces in a subscription. + * Get the specified network interface ip configuration in a virtual machine scale set. * - * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<NetworkInterfaceInner> object if successful. + * @return the PagedList<NetworkInterfaceIPConfigurationInner> object if successful. */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { + public PagedList listVirtualMachineScaleSetIpConfigurations(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName) { + ServiceResponse> response = listVirtualMachineScaleSetIpConfigurationsSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName).toBlocking().single(); + return new PagedList(response.body()) { @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + public Page nextPage(String nextPageLink) { + return listVirtualMachineScaleSetIpConfigurationsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; } /** - * Gets all network interfaces in a subscription. + * Get the specified network interface ip configuration in a virtual machine scale set. * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + public ServiceFuture> listVirtualMachineScaleSetIpConfigurationsAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName, final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { + listVirtualMachineScaleSetIpConfigurationsSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listVirtualMachineScaleSetIpConfigurationsNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Gets all network interfaces in a subscription. + * Get the specified network interface ip configuration in a virtual machine scale set. * - * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NetworkInterfaceInner> object + * @return the observable to the PagedList<NetworkInterfaceIPConfigurationInner> object */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + public Observable> listVirtualMachineScaleSetIpConfigurationsAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName) { + return listVirtualMachineScaleSetIpConfigurationsWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.body(); } }); } /** - * Gets all network interfaces in a subscription. + * Get the specified network interface ip configuration in a virtual machine scale set. * - * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NetworkInterfaceInner> object + * @return the observable to the PagedList<NetworkInterfaceIPConfigurationInner> object */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listVirtualMachineScaleSetIpConfigurationsWithServiceResponseAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName) { + return listVirtualMachineScaleSetIpConfigurationsSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listVirtualMachineScaleSetIpConfigurationsNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Gets all network interfaces in a subscription. + * Get the specified network interface ip configuration in a virtual machine scale set. * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<NetworkInterfaceInner> object wrapped in {@link ServiceResponse} if successful. + * @return the PagedList<NetworkInterfaceIPConfigurationInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + public Observable>> listVirtualMachineScaleSetIpConfigurationsSinglePageAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + if (virtualMachineScaleSetName == null) { + throw new IllegalArgumentException("Parameter virtualMachineScaleSetName is required and cannot be null."); + } + if (virtualmachineIndex == null) { + throw new IllegalArgumentException("Parameter virtualmachineIndex is required and cannot be null."); + } + if (networkInterfaceName == null) { + throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-03-30"; + final String expand = null; + return service.listVirtualMachineScaleSetIpConfigurations(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); + ServiceResponse> result = listVirtualMachineScaleSetIpConfigurationsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } @@ -1894,110 +2058,134 @@ public Observable>> call(Response> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - /** - * Gets all network interfaces in a resource group. + * Get the specified network interface ip configuration in a virtual machine scale set. * - * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @param expand Expands referenced resources. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<NetworkInterfaceInner> object if successful. + * @return the PagedList<NetworkInterfaceIPConfigurationInner> object if successful. */ - public PagedList listByResourceGroupNext(final String nextPageLink) { - ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { + public PagedList listVirtualMachineScaleSetIpConfigurations(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName, final String expand) { + ServiceResponse> response = listVirtualMachineScaleSetIpConfigurationsSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand).toBlocking().single(); + return new PagedList(response.body()) { @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + public Page nextPage(String nextPageLink) { + return listVirtualMachineScaleSetIpConfigurationsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; } /** - * Gets all network interfaces in a resource group. + * Get the specified network interface ip configuration in a virtual machine scale set. * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @param expand Expands referenced resources. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + public ServiceFuture> listVirtualMachineScaleSetIpConfigurationsAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName, final String expand, final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( - listByResourceGroupNextSinglePageAsync(nextPageLink), - new Func1>>>() { + listVirtualMachineScaleSetIpConfigurationsSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listVirtualMachineScaleSetIpConfigurationsNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Gets all network interfaces in a resource group. + * Get the specified network interface ip configuration in a virtual machine scale set. * - * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @param expand Expands referenced resources. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NetworkInterfaceInner> object + * @return the observable to the PagedList<NetworkInterfaceIPConfigurationInner> object */ - public Observable> listByResourceGroupNextAsync(final String nextPageLink) { - return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + public Observable> listVirtualMachineScaleSetIpConfigurationsAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName, final String expand) { + return listVirtualMachineScaleSetIpConfigurationsWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.body(); } }); } /** - * Gets all network interfaces in a resource group. + * Get the specified network interface ip configuration in a virtual machine scale set. * - * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @param expand Expands referenced resources. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NetworkInterfaceInner> object + * @return the observable to the PagedList<NetworkInterfaceIPConfigurationInner> object */ - public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listVirtualMachineScaleSetIpConfigurationsWithServiceResponseAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName, final String expand) { + return listVirtualMachineScaleSetIpConfigurationsSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listVirtualMachineScaleSetIpConfigurationsNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Gets all network interfaces in a resource group. + * Get the specified network interface ip configuration in a virtual machine scale set. * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param virtualMachineScaleSetName The name of the virtual machine scale set. + ServiceResponse> * @param virtualmachineIndex The virtual machine index. + ServiceResponse> * @param networkInterfaceName The name of the network interface. + ServiceResponse> * @param expand Expands referenced resources. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<NetworkInterfaceInner> object wrapped in {@link ServiceResponse} if successful. + * @return the PagedList<NetworkInterfaceIPConfigurationInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + public Observable>> listVirtualMachineScaleSetIpConfigurationsSinglePageAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName, final String expand) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } - String nextUrl = String.format("%s", nextPageLink); - return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + if (virtualMachineScaleSetName == null) { + throw new IllegalArgumentException("Parameter virtualMachineScaleSetName is required and cannot be null."); + } + if (virtualmachineIndex == null) { + throw new IllegalArgumentException("Parameter virtualmachineIndex is required and cannot be null."); + } + if (networkInterfaceName == null) { + throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-03-30"; + return service.listVirtualMachineScaleSetIpConfigurations(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = listByResourceGroupNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); + ServiceResponse> result = listVirtualMachineScaleSetIpConfigurationsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } @@ -2005,110 +2193,105 @@ public Observable>> call(Response> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listVirtualMachineScaleSetIpConfigurationsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets all route tables applied to a network interface. + * Get the specified network interface ip configuration in a virtual machine scale set. * - * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @param ipConfigurationName The name of the ip configuration. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<EffectiveRouteInner> object if successful. + * @return the NetworkInterfaceIPConfigurationInner object if successful. */ - public PagedList getEffectiveRouteTableNext(final String nextPageLink) { - ServiceResponse> response = getEffectiveRouteTableNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return getEffectiveRouteTableNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; + public NetworkInterfaceIPConfigurationInner getVirtualMachineScaleSetIpConfiguration(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName) { + return getVirtualMachineScaleSetIpConfigurationWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName).toBlocking().single().body(); } /** - * Gets all route tables applied to a network interface. + * Get the specified network interface ip configuration in a virtual machine scale set. * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @param ipConfigurationName The name of the ip configuration. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> getEffectiveRouteTableNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - getEffectiveRouteTableNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getEffectiveRouteTableNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all route tables applied to a network interface. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<EffectiveRouteInner> object - */ - public Observable> getEffectiveRouteTableNextAsync(final String nextPageLink) { - return getEffectiveRouteTableNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); + public ServiceFuture getVirtualMachineScaleSetIpConfigurationAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getVirtualMachineScaleSetIpConfigurationWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName), serviceCallback); } /** - * Gets all route tables applied to a network interface. + * Get the specified network interface ip configuration in a virtual machine scale set. * - * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @param ipConfigurationName The name of the ip configuration. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<EffectiveRouteInner> object + * @return the observable to the NetworkInterfaceIPConfigurationInner object */ - public Observable>> getEffectiveRouteTableNextWithServiceResponseAsync(final String nextPageLink) { - return getEffectiveRouteTableNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getEffectiveRouteTableNextWithServiceResponseAsync(nextPageLink)); - } - }); + public Observable getVirtualMachineScaleSetIpConfigurationAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName) { + return getVirtualMachineScaleSetIpConfigurationWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName).map(new Func1, NetworkInterfaceIPConfigurationInner>() { + @Override + public NetworkInterfaceIPConfigurationInner call(ServiceResponse response) { + return response.body(); + } + }); } /** - * Gets all route tables applied to a network interface. + * Get the specified network interface ip configuration in a virtual machine scale set. * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @param ipConfigurationName The name of the ip configuration. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<EffectiveRouteInner> object wrapped in {@link ServiceResponse} if successful. + * @return the observable to the NetworkInterfaceIPConfigurationInner object */ - public Observable>> getEffectiveRouteTableNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + public Observable> getVirtualMachineScaleSetIpConfigurationWithServiceResponseAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualMachineScaleSetName == null) { + throw new IllegalArgumentException("Parameter virtualMachineScaleSetName is required and cannot be null."); + } + if (virtualmachineIndex == null) { + throw new IllegalArgumentException("Parameter virtualmachineIndex is required and cannot be null."); + } + if (networkInterfaceName == null) { + throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null."); } - String nextUrl = String.format("%s", nextPageLink); - return service.getEffectiveRouteTableNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + if (ipConfigurationName == null) { + throw new IllegalArgumentException("Parameter ipConfigurationName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-03-30"; + final String expand = null; + return service.getVirtualMachineScaleSetIpConfiguration(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable>> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse> result = getEffectiveRouteTableNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); + ServiceResponse clientResponse = getVirtualMachineScaleSetIpConfigurationDelegate(response); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -2116,111 +2299,101 @@ public Observable>> call(Response> getEffectiveRouteTableNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException, InterruptedException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - /** - * Gets all route tables applied to a network interface. + * Get the specified network interface ip configuration in a virtual machine scale set. * - * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @param ipConfigurationName The name of the ip configuration. + * @param expand Expands referenced resources. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<EffectiveRouteInner> object if successful. + * @return the NetworkInterfaceIPConfigurationInner object if successful. */ - public PagedList beginGetEffectiveRouteTableNext(final String nextPageLink) { - ServiceResponse> response = beginGetEffectiveRouteTableNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return beginGetEffectiveRouteTableNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; + public NetworkInterfaceIPConfigurationInner getVirtualMachineScaleSetIpConfiguration(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName, String expand) { + return getVirtualMachineScaleSetIpConfigurationWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName, expand).toBlocking().single().body(); } /** - * Gets all route tables applied to a network interface. + * Get the specified network interface ip configuration in a virtual machine scale set. * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @param ipConfigurationName The name of the ip configuration. + * @param expand Expands referenced resources. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> beginGetEffectiveRouteTableNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - beginGetEffectiveRouteTableNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return beginGetEffectiveRouteTableNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all route tables applied to a network interface. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<EffectiveRouteInner> object - */ - public Observable> beginGetEffectiveRouteTableNextAsync(final String nextPageLink) { - return beginGetEffectiveRouteTableNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); + public ServiceFuture getVirtualMachineScaleSetIpConfigurationAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName, String expand, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getVirtualMachineScaleSetIpConfigurationWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName, expand), serviceCallback); } /** - * Gets all route tables applied to a network interface. + * Get the specified network interface ip configuration in a virtual machine scale set. * - * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @param ipConfigurationName The name of the ip configuration. + * @param expand Expands referenced resources. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<EffectiveRouteInner> object + * @return the observable to the NetworkInterfaceIPConfigurationInner object */ - public Observable>> beginGetEffectiveRouteTableNextWithServiceResponseAsync(final String nextPageLink) { - return beginGetEffectiveRouteTableNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(beginGetEffectiveRouteTableNextWithServiceResponseAsync(nextPageLink)); - } - }); + public Observable getVirtualMachineScaleSetIpConfigurationAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName, String expand) { + return getVirtualMachineScaleSetIpConfigurationWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName, expand).map(new Func1, NetworkInterfaceIPConfigurationInner>() { + @Override + public NetworkInterfaceIPConfigurationInner call(ServiceResponse response) { + return response.body(); + } + }); } /** - * Gets all route tables applied to a network interface. + * Get the specified network interface ip configuration in a virtual machine scale set. * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the virtual machine scale set. + * @param virtualmachineIndex The virtual machine index. + * @param networkInterfaceName The name of the network interface. + * @param ipConfigurationName The name of the ip configuration. + * @param expand Expands referenced resources. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<EffectiveRouteInner> object wrapped in {@link ServiceResponse} if successful. + * @return the observable to the NetworkInterfaceIPConfigurationInner object */ - public Observable>> beginGetEffectiveRouteTableNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + public Observable> getVirtualMachineScaleSetIpConfigurationWithServiceResponseAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName, String expand) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } - String nextUrl = String.format("%s", nextPageLink); - return service.beginGetEffectiveRouteTableNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + if (virtualMachineScaleSetName == null) { + throw new IllegalArgumentException("Parameter virtualMachineScaleSetName is required and cannot be null."); + } + if (virtualmachineIndex == null) { + throw new IllegalArgumentException("Parameter virtualmachineIndex is required and cannot be null."); + } + if (networkInterfaceName == null) { + throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null."); + } + if (ipConfigurationName == null) { + throw new IllegalArgumentException("Parameter ipConfigurationName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-03-30"; + return service.getVirtualMachineScaleSetIpConfiguration(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable>> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse> result = beginGetEffectiveRouteTableNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); + ServiceResponse clientResponse = getVirtualMachineScaleSetIpConfigurationDelegate(response); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -2228,35 +2401,34 @@ public Observable>> call(Response> beginGetEffectiveRouteTableNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .register(202, new TypeToken() { }.getType()) + private ServiceResponse getVirtualMachineScaleSetIpConfigurationDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets all network security groups applied to a network interface. + * Gets all network interfaces in a subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<EffectiveNetworkSecurityGroupInner> object if successful. + * @return the PagedList<NetworkInterfaceInner> object if successful. */ - public PagedList listEffectiveNetworkSecurityGroupsNext(final String nextPageLink) { - ServiceResponse> response = listEffectiveNetworkSecurityGroupsNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { @Override - public Page nextPage(String nextPageLink) { - return listEffectiveNetworkSecurityGroupsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; } /** - * Gets all network security groups applied to a network interface. + * Gets all network interfaces in a subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceFuture the ServiceFuture object tracking the Retrofit calls @@ -2264,75 +2436,75 @@ public Page nextPage(String nextPageLink) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listEffectiveNetworkSecurityGroupsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( - listEffectiveNetworkSecurityGroupsNextSinglePageAsync(nextPageLink), - new Func1>>>() { + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return listEffectiveNetworkSecurityGroupsNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Gets all network security groups applied to a network interface. + * Gets all network interfaces in a subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<EffectiveNetworkSecurityGroupInner> object + * @return the observable to the PagedList<NetworkInterfaceInner> object */ - public Observable> listEffectiveNetworkSecurityGroupsNextAsync(final String nextPageLink) { - return listEffectiveNetworkSecurityGroupsNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.body(); } }); } /** - * Gets all network security groups applied to a network interface. + * Gets all network interfaces in a subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<EffectiveNetworkSecurityGroupInner> object + * @return the observable to the PagedList<NetworkInterfaceInner> object */ - public Observable>> listEffectiveNetworkSecurityGroupsNextWithServiceResponseAsync(final String nextPageLink) { - return listEffectiveNetworkSecurityGroupsNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(listEffectiveNetworkSecurityGroupsNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Gets all network security groups applied to a network interface. + * Gets all network interfaces in a subscription. * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<EffectiveNetworkSecurityGroupInner> object wrapped in {@link ServiceResponse} if successful. + * @return the PagedList<NetworkInterfaceInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> listEffectiveNetworkSecurityGroupsNextSinglePageAsync(final String nextPageLink) { + public Observable>> listNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } String nextUrl = String.format("%s", nextPageLink); - return service.listEffectiveNetworkSecurityGroupsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = listEffectiveNetworkSecurityGroupsNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } @@ -2340,35 +2512,34 @@ public Observable>> cal }); } - private ServiceResponse> listEffectiveNetworkSecurityGroupsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException, InterruptedException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .register(202, new TypeToken() { }.getType()) + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets all network security groups applied to a network interface. + * Gets all network interfaces in a resource group. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<EffectiveNetworkSecurityGroupInner> object if successful. + * @return the PagedList<NetworkInterfaceInner> object if successful. */ - public PagedList beginListEffectiveNetworkSecurityGroupsNext(final String nextPageLink) { - ServiceResponse> response = beginListEffectiveNetworkSecurityGroupsNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { + public PagedList listByResourceGroupNext(final String nextPageLink) { + ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { @Override - public Page nextPage(String nextPageLink) { - return beginListEffectiveNetworkSecurityGroupsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; } /** - * Gets all network security groups applied to a network interface. + * Gets all network interfaces in a resource group. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceFuture the ServiceFuture object tracking the Retrofit calls @@ -2376,75 +2547,75 @@ public Page nextPage(String nextPageLink) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> beginListEffectiveNetworkSecurityGroupsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( - beginListEffectiveNetworkSecurityGroupsNextSinglePageAsync(nextPageLink), - new Func1>>>() { + listByResourceGroupNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return beginListEffectiveNetworkSecurityGroupsNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Gets all network security groups applied to a network interface. + * Gets all network interfaces in a resource group. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<EffectiveNetworkSecurityGroupInner> object + * @return the observable to the PagedList<NetworkInterfaceInner> object */ - public Observable> beginListEffectiveNetworkSecurityGroupsNextAsync(final String nextPageLink) { - return beginListEffectiveNetworkSecurityGroupsNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.body(); } }); } /** - * Gets all network security groups applied to a network interface. + * Gets all network interfaces in a resource group. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<EffectiveNetworkSecurityGroupInner> object + * @return the observable to the PagedList<NetworkInterfaceInner> object */ - public Observable>> beginListEffectiveNetworkSecurityGroupsNextWithServiceResponseAsync(final String nextPageLink) { - return beginListEffectiveNetworkSecurityGroupsNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(beginListEffectiveNetworkSecurityGroupsNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Gets all network security groups applied to a network interface. + * Gets all network interfaces in a resource group. * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<EffectiveNetworkSecurityGroupInner> object wrapped in {@link ServiceResponse} if successful. + * @return the PagedList<NetworkInterfaceInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> beginListEffectiveNetworkSecurityGroupsNextSinglePageAsync(final String nextPageLink) { + public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } String nextUrl = String.format("%s", nextPageLink); - return service.beginListEffectiveNetworkSecurityGroupsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = beginListEffectiveNetworkSecurityGroupsNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); + ServiceResponse> result = listByResourceGroupNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } @@ -2452,10 +2623,9 @@ public Observable>> cal }); } - private ServiceResponse> beginListEffectiveNetworkSecurityGroupsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .register(202, new TypeToken() { }.getType()) + private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -2682,4 +2852,115 @@ private ServiceResponse> listVirtualMachineScale .build(response); } + /** + * Get the specified network interface ip configuration in a virtual machine scale set. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<NetworkInterfaceIPConfigurationInner> object if successful. + */ + public PagedList listVirtualMachineScaleSetIpConfigurationsNext(final String nextPageLink) { + ServiceResponse> response = listVirtualMachineScaleSetIpConfigurationsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listVirtualMachineScaleSetIpConfigurationsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get the specified network interface ip configuration in a virtual machine scale set. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listVirtualMachineScaleSetIpConfigurationsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listVirtualMachineScaleSetIpConfigurationsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listVirtualMachineScaleSetIpConfigurationsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get the specified network interface ip configuration in a virtual machine scale set. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NetworkInterfaceIPConfigurationInner> object + */ + public Observable> listVirtualMachineScaleSetIpConfigurationsNextAsync(final String nextPageLink) { + return listVirtualMachineScaleSetIpConfigurationsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get the specified network interface ip configuration in a virtual machine scale set. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<NetworkInterfaceIPConfigurationInner> object + */ + public Observable>> listVirtualMachineScaleSetIpConfigurationsNextWithServiceResponseAsync(final String nextPageLink) { + return listVirtualMachineScaleSetIpConfigurationsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listVirtualMachineScaleSetIpConfigurationsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get the specified network interface ip configuration in a virtual machine scale set. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<NetworkInterfaceIPConfigurationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listVirtualMachineScaleSetIpConfigurationsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listVirtualMachineScaleSetIpConfigurationsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listVirtualMachineScaleSetIpConfigurationsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listVirtualMachineScaleSetIpConfigurationsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkManagementClientImpl.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkManagementClientImpl.java index 4cdbda443cd..4bfbb90cedb 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkManagementClientImpl.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkManagementClientImpl.java @@ -150,6 +150,45 @@ public ApplicationGatewaysInner applicationGateways() { return this.applicationGateways; } + /** + * The ApplicationSecurityGroupsInner object to access its operations. + */ + private ApplicationSecurityGroupsInner applicationSecurityGroups; + + /** + * Gets the ApplicationSecurityGroupsInner object to access its operations. + * @return the ApplicationSecurityGroupsInner object. + */ + public ApplicationSecurityGroupsInner applicationSecurityGroups() { + return this.applicationSecurityGroups; + } + + /** + * The DdosProtectionPlansInner object to access its operations. + */ + private DdosProtectionPlansInner ddosProtectionPlans; + + /** + * Gets the DdosProtectionPlansInner object to access its operations. + * @return the DdosProtectionPlansInner object. + */ + public DdosProtectionPlansInner ddosProtectionPlans() { + return this.ddosProtectionPlans; + } + + /** + * The AvailableEndpointServicesInner object to access its operations. + */ + private AvailableEndpointServicesInner availableEndpointServices; + + /** + * Gets the AvailableEndpointServicesInner object to access its operations. + * @return the AvailableEndpointServicesInner object. + */ + public AvailableEndpointServicesInner availableEndpointServices() { + return this.availableEndpointServices; + } + /** * The ExpressRouteCircuitAuthorizationsInner object to access its operations. */ @@ -176,6 +215,19 @@ public ExpressRouteCircuitPeeringsInner expressRouteCircuitPeerings() { return this.expressRouteCircuitPeerings; } + /** + * The ExpressRouteCircuitConnectionsInner object to access its operations. + */ + private ExpressRouteCircuitConnectionsInner expressRouteCircuitConnections; + + /** + * Gets the ExpressRouteCircuitConnectionsInner object to access its operations. + * @return the ExpressRouteCircuitConnectionsInner object. + */ + public ExpressRouteCircuitConnectionsInner expressRouteCircuitConnections() { + return this.expressRouteCircuitConnections; + } + /** * The ExpressRouteCircuitsInner object to access its operations. */ @@ -202,6 +254,32 @@ public ExpressRouteServiceProvidersInner expressRouteServiceProviders() { return this.expressRouteServiceProviders; } + /** + * The ExpressRouteCrossConnectionsInner object to access its operations. + */ + private ExpressRouteCrossConnectionsInner expressRouteCrossConnections; + + /** + * Gets the ExpressRouteCrossConnectionsInner object to access its operations. + * @return the ExpressRouteCrossConnectionsInner object. + */ + public ExpressRouteCrossConnectionsInner expressRouteCrossConnections() { + return this.expressRouteCrossConnections; + } + + /** + * The ExpressRouteCrossConnectionPeeringsInner object to access its operations. + */ + private ExpressRouteCrossConnectionPeeringsInner expressRouteCrossConnectionPeerings; + + /** + * Gets the ExpressRouteCrossConnectionPeeringsInner object to access its operations. + * @return the ExpressRouteCrossConnectionPeeringsInner object. + */ + public ExpressRouteCrossConnectionPeeringsInner expressRouteCrossConnectionPeerings() { + return this.expressRouteCrossConnectionPeerings; + } + /** * The LoadBalancersInner object to access its operations. */ @@ -397,6 +475,32 @@ public PacketCapturesInner packetCaptures() { return this.packetCaptures; } + /** + * The ConnectionMonitorsInner object to access its operations. + */ + private ConnectionMonitorsInner connectionMonitors; + + /** + * Gets the ConnectionMonitorsInner object to access its operations. + * @return the ConnectionMonitorsInner object. + */ + public ConnectionMonitorsInner connectionMonitors() { + return this.connectionMonitors; + } + + /** + * The OperationsInner object to access its operations. + */ + private OperationsInner operations; + + /** + * Gets the OperationsInner object to access its operations. + * @return the OperationsInner object. + */ + public OperationsInner operations() { + return this.operations; + } + /** * The PublicIPAddressesInner object to access its operations. */ @@ -601,10 +705,16 @@ protected void initialize() { this.longRunningOperationRetryTimeout = 30; this.generateClientRequestId = true; this.applicationGateways = new ApplicationGatewaysInner(restClient().retrofit(), this); + this.applicationSecurityGroups = new ApplicationSecurityGroupsInner(restClient().retrofit(), this); + this.ddosProtectionPlans = new DdosProtectionPlansInner(restClient().retrofit(), this); + this.availableEndpointServices = new AvailableEndpointServicesInner(restClient().retrofit(), this); this.expressRouteCircuitAuthorizations = new ExpressRouteCircuitAuthorizationsInner(restClient().retrofit(), this); this.expressRouteCircuitPeerings = new ExpressRouteCircuitPeeringsInner(restClient().retrofit(), this); + this.expressRouteCircuitConnections = new ExpressRouteCircuitConnectionsInner(restClient().retrofit(), this); this.expressRouteCircuits = new ExpressRouteCircuitsInner(restClient().retrofit(), this); this.expressRouteServiceProviders = new ExpressRouteServiceProvidersInner(restClient().retrofit(), this); + this.expressRouteCrossConnections = new ExpressRouteCrossConnectionsInner(restClient().retrofit(), this); + this.expressRouteCrossConnectionPeerings = new ExpressRouteCrossConnectionPeeringsInner(restClient().retrofit(), this); this.loadBalancers = new LoadBalancersInner(restClient().retrofit(), this); this.loadBalancerBackendAddressPools = new LoadBalancerBackendAddressPoolsInner(restClient().retrofit(), this); this.loadBalancerFrontendIPConfigurations = new LoadBalancerFrontendIPConfigurationsInner(restClient().retrofit(), this); @@ -620,6 +730,8 @@ protected void initialize() { this.defaultSecurityRules = new DefaultSecurityRulesInner(restClient().retrofit(), this); this.networkWatchers = new NetworkWatchersInner(restClient().retrofit(), this); this.packetCaptures = new PacketCapturesInner(restClient().retrofit(), this); + this.connectionMonitors = new ConnectionMonitorsInner(restClient().retrofit(), this); + this.operations = new OperationsInner(restClient().retrofit(), this); this.publicIPAddresses = new PublicIPAddressesInner(restClient().retrofit(), this); this.routeFilters = new RouteFiltersInner(restClient().retrofit(), this); this.routeFilterRules = new RouteFilterRulesInner(restClient().retrofit(), this); @@ -663,78 +775,7 @@ interface NetworkManagementClientService { } /** - * Checks whether a domain name in the cloudapp.net zone is available for use. - * - * @param location The location of the domain name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the DnsNameAvailabilityResultInner object if successful. - */ - public DnsNameAvailabilityResultInner checkDnsNameAvailability(String location) { - return checkDnsNameAvailabilityWithServiceResponseAsync(location).toBlocking().single().body(); - } - - /** - * Checks whether a domain name in the cloudapp.net zone is available for use. - * - * @param location The location of the domain name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture checkDnsNameAvailabilityAsync(String location, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(checkDnsNameAvailabilityWithServiceResponseAsync(location), serviceCallback); - } - - /** - * Checks whether a domain name in the cloudapp.net zone is available for use. - * - * @param location The location of the domain name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the DnsNameAvailabilityResultInner object - */ - public Observable checkDnsNameAvailabilityAsync(String location) { - return checkDnsNameAvailabilityWithServiceResponseAsync(location).map(new Func1, DnsNameAvailabilityResultInner>() { - @Override - public DnsNameAvailabilityResultInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Checks whether a domain name in the cloudapp.net zone is available for use. - * - * @param location The location of the domain name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the DnsNameAvailabilityResultInner object - */ - public Observable> checkDnsNameAvailabilityWithServiceResponseAsync(String location) { - if (location == null) { - throw new IllegalArgumentException("Parameter location is required and cannot be null."); - } - if (this.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); - } - final String apiVersion = "2017-08-01"; - final String domainNameLabel = null; - return service.checkDnsNameAvailability(location, this.subscriptionId(), domainNameLabel, apiVersion, this.acceptLanguage(), this.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = checkDnsNameAvailabilityDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Checks whether a domain name in the cloudapp.net zone is available for use. + * Checks whether a domain name in the cloudapp.azure.com zone is available for use. * * @param location The location of the domain name. * @param domainNameLabel The domain name to be verified. It must conform to the following regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$. @@ -748,7 +789,7 @@ public DnsNameAvailabilityResultInner checkDnsNameAvailability(String location, } /** - * Checks whether a domain name in the cloudapp.net zone is available for use. + * Checks whether a domain name in the cloudapp.azure.com zone is available for use. * * @param location The location of the domain name. * @param domainNameLabel The domain name to be verified. It must conform to the following regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$. @@ -761,7 +802,7 @@ public ServiceFuture checkDnsNameAvailabilityAsy } /** - * Checks whether a domain name in the cloudapp.net zone is available for use. + * Checks whether a domain name in the cloudapp.azure.com zone is available for use. * * @param location The location of the domain name. * @param domainNameLabel The domain name to be verified. It must conform to the following regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$. @@ -778,7 +819,7 @@ public DnsNameAvailabilityResultInner call(ServiceResponse> checkDnsNameA if (this.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + if (domainNameLabel == null) { + throw new IllegalArgumentException("Parameter domainNameLabel is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; return service.checkDnsNameAvailability(location, this.subscriptionId(), domainNameLabel, apiVersion, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>() { @Override diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkSecurityGroupInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkSecurityGroupInner.java index 90456e42dd3..5e4271f88d6 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkSecurityGroupInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkSecurityGroupInner.java @@ -11,12 +11,14 @@ import java.util.List; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; import com.microsoft.azure.Resource; /** * NetworkSecurityGroup resource. */ @JsonFlatten +@SkipParentValidation public class NetworkSecurityGroupInner extends Resource { /** * A collection of security rules of the network security group. @@ -62,7 +64,13 @@ public class NetworkSecurityGroupInner extends Resource { private String etag; /** - * Get the securityRules value. + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get a collection of security rules of the network security group. * * @return the securityRules value */ @@ -71,7 +79,7 @@ public List securityRules() { } /** - * Set the securityRules value. + * Set a collection of security rules of the network security group. * * @param securityRules the securityRules value to set * @return the NetworkSecurityGroupInner object itself. @@ -82,7 +90,7 @@ public NetworkSecurityGroupInner withSecurityRules(List secur } /** - * Get the defaultSecurityRules value. + * Get the default security rules of network security group. * * @return the defaultSecurityRules value */ @@ -91,7 +99,7 @@ public List defaultSecurityRules() { } /** - * Set the defaultSecurityRules value. + * Set the default security rules of network security group. * * @param defaultSecurityRules the defaultSecurityRules value to set * @return the NetworkSecurityGroupInner object itself. @@ -102,7 +110,7 @@ public NetworkSecurityGroupInner withDefaultSecurityRules(List networkInterfaces() { } /** - * Get the subnets value. + * Get a collection of references to subnets. * * @return the subnets value */ @@ -120,7 +128,7 @@ public List subnets() { } /** - * Get the resourceGuid value. + * Get the resource GUID property of the network security group resource. * * @return the resourceGuid value */ @@ -129,7 +137,7 @@ public String resourceGuid() { } /** - * Set the resourceGuid value. + * Set the resource GUID property of the network security group resource. * * @param resourceGuid the resourceGuid value to set * @return the NetworkSecurityGroupInner object itself. @@ -140,7 +148,7 @@ public NetworkSecurityGroupInner withResourceGuid(String resourceGuid) { } /** - * Get the provisioningState value. + * Get the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. * * @return the provisioningState value */ @@ -149,7 +157,7 @@ public String provisioningState() { } /** - * Set the provisioningState value. + * Set the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. * * @param provisioningState the provisioningState value to set * @return the NetworkSecurityGroupInner object itself. @@ -160,7 +168,7 @@ public NetworkSecurityGroupInner withProvisioningState(String provisioningState) } /** - * Get the etag value. + * Get a unique read-only string that changes whenever the resource is updated. * * @return the etag value */ @@ -169,7 +177,7 @@ public String etag() { } /** - * Set the etag value. + * Set a unique read-only string that changes whenever the resource is updated. * * @param etag the etag value to set * @return the NetworkSecurityGroupInner object itself. @@ -179,4 +187,24 @@ public NetworkSecurityGroupInner withEtag(String etag) { return this; } + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the NetworkSecurityGroupInner object itself. + */ + public NetworkSecurityGroupInner withId(String id) { + this.id = id; + return this; + } + } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkSecurityGroupsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkSecurityGroupsInner.java index b73f2500d94..5a17bb7fbbf 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkSecurityGroupsInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkSecurityGroupsInner.java @@ -16,6 +16,7 @@ import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.network.TagsObject; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -24,12 +25,14 @@ import com.microsoft.rest.Validator; import java.io.IOException; import java.util.List; +import java.util.Map; import okhttp3.ResponseBody; import retrofit2.http.Body; import retrofit2.http.GET; import retrofit2.http.Header; import retrofit2.http.Headers; import retrofit2.http.HTTP; +import retrofit2.http.PATCH; import retrofit2.http.Path; import retrofit2.http.PUT; import retrofit2.http.Query; @@ -84,6 +87,14 @@ interface NetworkSecurityGroupsService { @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}") Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("networkSecurityGroupName") String networkSecurityGroupName, @Path("subscriptionId") String subscriptionId, @Body NetworkSecurityGroupInner 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.network.NetworkSecurityGroups updateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}") + Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("networkSecurityGroupName") String networkSecurityGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.NetworkSecurityGroups beginUpdateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}") + Observable> beginUpdateTags(@Path("resourceGroupName") String resourceGroupName, @Path("networkSecurityGroupName") String networkSecurityGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.NetworkSecurityGroups list" }) @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/networkSecurityGroups") Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -163,7 +174,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.delete(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -229,7 +240,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -246,8 +257,8 @@ public Observable> call(Response response) { private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(202, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -315,7 +326,7 @@ public Observable> getByResourceGroup if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; final String expand = null; return service.getByResourceGroup(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -397,7 +408,7 @@ public Observable> getByResourceGroup if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.getByResourceGroup(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -489,7 +500,7 @@ public Observable> createOrUpdateWith throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.createOrUpdate(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -564,7 +575,7 @@ public Observable> beginCreateOrUpdat throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -581,7 +592,321 @@ public Observable> call(Response beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates a network security group tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the NetworkSecurityGroupInner object if successful. + */ + public NetworkSecurityGroupInner updateTags(String resourceGroupName, String networkSecurityGroupName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName).toBlocking().last().body(); + } + + /** + * Updates a network security group tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateTagsAsync(String resourceGroupName, String networkSecurityGroupName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName), serviceCallback); + } + + /** + * Updates a network security group tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateTagsAsync(String resourceGroupName, String networkSecurityGroupName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName).map(new Func1, NetworkSecurityGroupInner>() { + @Override + public NetworkSecurityGroupInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a network security group tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String networkSecurityGroupName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkSecurityGroupName == null) { + throw new IllegalArgumentException("Parameter networkSecurityGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + Observable> observable = service.updateTags(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Updates a network security group tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the NetworkSecurityGroupInner object if successful. + */ + public NetworkSecurityGroupInner updateTags(String resourceGroupName, String networkSecurityGroupName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, tags).toBlocking().last().body(); + } + + /** + * Updates a network security group tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param tags Resource tags. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateTagsAsync(String resourceGroupName, String networkSecurityGroupName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, tags), serviceCallback); + } + + /** + * Updates a network security group tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateTagsAsync(String resourceGroupName, String networkSecurityGroupName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, tags).map(new Func1, NetworkSecurityGroupInner>() { + @Override + public NetworkSecurityGroupInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a network security group tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String networkSecurityGroupName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkSecurityGroupName == null) { + throw new IllegalArgumentException("Parameter networkSecurityGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + Observable> observable = service.updateTags(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Updates a network security group tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the NetworkSecurityGroupInner object if successful. + */ + public NetworkSecurityGroupInner beginUpdateTags(String resourceGroupName, String networkSecurityGroupName) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName).toBlocking().single().body(); + } + + /** + * Updates a network security group tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateTagsAsync(String resourceGroupName, String networkSecurityGroupName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName), serviceCallback); + } + + /** + * Updates a network security group tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkSecurityGroupInner object + */ + public Observable beginUpdateTagsAsync(String resourceGroupName, String networkSecurityGroupName) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName).map(new Func1, NetworkSecurityGroupInner>() { + @Override + public NetworkSecurityGroupInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a network security group tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkSecurityGroupInner object + */ + public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String networkSecurityGroupName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkSecurityGroupName == null) { + throw new IllegalArgumentException("Parameter networkSecurityGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.beginUpdateTags(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates a network security group tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the NetworkSecurityGroupInner object if successful. + */ + public NetworkSecurityGroupInner beginUpdateTags(String resourceGroupName, String networkSecurityGroupName, Map tags) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, tags).toBlocking().single().body(); + } + + /** + * Updates a network security group tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param tags Resource tags. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateTagsAsync(String resourceGroupName, String networkSecurityGroupName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, tags), serviceCallback); + } + + /** + * Updates a network security group tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkSecurityGroupInner object + */ + public Observable beginUpdateTagsAsync(String resourceGroupName, String networkSecurityGroupName, Map tags) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, tags).map(new Func1, NetworkSecurityGroupInner>() { + @Override + public NetworkSecurityGroupInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a network security group tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkSecurityGroupName The name of the network security group. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkSecurityGroupInner object + */ + public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String networkSecurityGroupName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkSecurityGroupName == null) { + throw new IllegalArgumentException("Parameter networkSecurityGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.beginUpdateTags(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateTagsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -670,7 +995,7 @@ public Observable>> listSinglePa if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -783,7 +1108,7 @@ public Observable>> listByResour if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkWatcherInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkWatcherInner.java index b78eab09be3..863f17e22b4 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkWatcherInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkWatcherInner.java @@ -11,12 +11,14 @@ import com.microsoft.azure.management.network.ProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; import com.microsoft.azure.Resource; /** * Network watcher in a resource group. */ @JsonFlatten +@SkipParentValidation public class NetworkWatcherInner extends Resource { /** * A unique read-only string that changes whenever the resource is updated. @@ -32,7 +34,13 @@ public class NetworkWatcherInner extends Resource { private ProvisioningState provisioningState; /** - * Get the etag value. + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get a unique read-only string that changes whenever the resource is updated. * * @return the etag value */ @@ -41,7 +49,7 @@ public String etag() { } /** - * Set the etag value. + * Set a unique read-only string that changes whenever the resource is updated. * * @param etag the etag value to set * @return the NetworkWatcherInner object itself. @@ -52,7 +60,7 @@ public NetworkWatcherInner withEtag(String etag) { } /** - * Get the provisioningState value. + * Get the provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. * * @return the provisioningState value */ @@ -60,4 +68,24 @@ public ProvisioningState provisioningState() { return this.provisioningState; } + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the NetworkWatcherInner object itself. + */ + public NetworkWatcherInner withId(String id) { + this.id = id; + return this; + } + } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkWatchersInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkWatchersInner.java index d6ee5e1b5e0..374a54d795e 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkWatchersInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkWatchersInner.java @@ -14,10 +14,17 @@ import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; import com.microsoft.azure.CloudException; +import com.microsoft.azure.management.network.AvailableProvidersListParameters; +import com.microsoft.azure.management.network.AzureReachabilityReportParameters; +import com.microsoft.azure.management.network.ConnectivityParameters; import com.microsoft.azure.management.network.FlowLogStatusParameters; +import com.microsoft.azure.management.network.NextHopParameters; import com.microsoft.azure.management.network.QueryTroubleshootingParameters; import com.microsoft.azure.management.network.SecurityGroupViewParameters; +import com.microsoft.azure.management.network.TagsObject; import com.microsoft.azure.management.network.TopologyParameters; +import com.microsoft.azure.management.network.TroubleshootingParameters; +import com.microsoft.azure.management.network.VerificationIPFlowParameters; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -26,12 +33,14 @@ import com.microsoft.rest.Validator; import java.io.IOException; import java.util.List; +import java.util.Map; import okhttp3.ResponseBody; import retrofit2.http.Body; import retrofit2.http.GET; import retrofit2.http.Header; import retrofit2.http.Headers; import retrofit2.http.HTTP; +import retrofit2.http.PATCH; import retrofit2.http.Path; import retrofit2.http.POST; import retrofit2.http.PUT; @@ -82,6 +91,10 @@ interface NetworkWatchersService { @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}", method = "DELETE", hasBody = true) Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @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.network.NetworkWatchers updateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}") + Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.NetworkWatchers listByResourceGroup" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers") Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -92,23 +105,23 @@ interface NetworkWatchersService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.NetworkWatchers getTopology" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/topology") - Observable> getTopology(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TopologyParameters parameters, @Header("User-Agent") String userAgent); + Observable> getTopology(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Body TopologyParameters 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.network.NetworkWatchers verifyIPFlow" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/ipFlowVerify") - Observable> verifyIPFlow(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Body VerificationIPFlowParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> verifyIPFlow(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Body VerificationIPFlowParameters 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.network.NetworkWatchers beginVerifyIPFlow" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/ipFlowVerify") - Observable> beginVerifyIPFlow(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Body VerificationIPFlowParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> beginVerifyIPFlow(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Body VerificationIPFlowParameters 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.network.NetworkWatchers getNextHop" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/nextHop") - Observable> getNextHop(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Body NextHopParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getNextHop(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Body NextHopParameters 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.network.NetworkWatchers beginGetNextHop" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/nextHop") - Observable> beginGetNextHop(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Body NextHopParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> beginGetNextHop(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Body NextHopParameters 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.network.NetworkWatchers getVMSecurityRules" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/securityGroupView") @@ -120,11 +133,11 @@ interface NetworkWatchersService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.NetworkWatchers getTroubleshooting" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/troubleshoot") - Observable> getTroubleshooting(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Body TroubleshootingParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getTroubleshooting(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Body TroubleshootingParameters 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.network.NetworkWatchers beginGetTroubleshooting" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/troubleshoot") - Observable> beginGetTroubleshooting(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Body TroubleshootingParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> beginGetTroubleshooting(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Body TroubleshootingParameters 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.network.NetworkWatchers getTroubleshootingResult" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryTroubleshootResult") @@ -152,11 +165,27 @@ interface NetworkWatchersService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.NetworkWatchers checkConnectivity" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectivityCheck") - Observable> checkConnectivity(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Body ConnectivityParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> checkConnectivity(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Body ConnectivityParameters 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.network.NetworkWatchers beginCheckConnectivity" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectivityCheck") - Observable> beginCheckConnectivity(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Body ConnectivityParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> beginCheckConnectivity(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Body ConnectivityParameters 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.network.NetworkWatchers getAzureReachabilityReport" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/azureReachabilityReport") + Observable> getAzureReachabilityReport(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Body AzureReachabilityReportParameters 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.network.NetworkWatchers beginGetAzureReachabilityReport" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/azureReachabilityReport") + Observable> beginGetAzureReachabilityReport(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Body AzureReachabilityReportParameters 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.network.NetworkWatchers listAvailableProviders" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/availableProvidersList") + Observable> listAvailableProviders(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Body AvailableProvidersListParameters 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.network.NetworkWatchers beginListAvailableProviders" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/availableProvidersList") + Observable> beginListAvailableProviders(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Body AvailableProvidersListParameters parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); } @@ -230,7 +259,7 @@ public Observable> createOrUpdateWithServic throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.createOrUpdate(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -315,7 +344,7 @@ public Observable> getByResourceGroupWithSe if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.getByResourceGroup(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -398,7 +427,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.delete(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -464,7 +493,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -487,6 +516,177 @@ private ServiceResponse beginDeleteDelegate(Response respons .build(response); } + /** + * Updates a network watcher tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the NetworkWatcherInner object if successful. + */ + public NetworkWatcherInner updateTags(String resourceGroupName, String networkWatcherName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, networkWatcherName).toBlocking().single().body(); + } + + /** + * Updates a network watcher tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateTagsAsync(String resourceGroupName, String networkWatcherName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, networkWatcherName), serviceCallback); + } + + /** + * Updates a network watcher tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkWatcherInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String networkWatcherName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, networkWatcherName).map(new Func1, NetworkWatcherInner>() { + @Override + public NetworkWatcherInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a network watcher tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkWatcherInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String networkWatcherName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.updateTags(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates a network watcher tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the NetworkWatcherInner object if successful. + */ + public NetworkWatcherInner updateTags(String resourceGroupName, String networkWatcherName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, networkWatcherName, tags).toBlocking().single().body(); + } + + /** + * Updates a network watcher tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param tags Resource tags. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateTagsAsync(String resourceGroupName, String networkWatcherName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, networkWatcherName, tags), serviceCallback); + } + + /** + * Updates a network watcher tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkWatcherInner object + */ + public Observable updateTagsAsync(String resourceGroupName, String networkWatcherName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, networkWatcherName, tags).map(new Func1, NetworkWatcherInner>() { + @Override + public NetworkWatcherInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a network watcher tags. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkWatcherInner object + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.updateTags(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateTagsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** * Gets all network watchers by resource group. * @@ -546,14 +746,18 @@ public Observable>> listByResourceGrou if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { ServiceResponse> result = listByResourceGroupDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.response()); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -621,14 +825,18 @@ public Observable>> listWithServiceRes if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { ServiceResponse> result = listDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.response()); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -649,14 +857,14 @@ private ServiceResponse> listDelegate(Response getTopologyAsync(String resourceGroupName, String networkWatcherName, String targetResourceGroupName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getTopologyWithServiceResponseAsync(resourceGroupName, networkWatcherName, targetResourceGroupName), serviceCallback); + public ServiceFuture getTopologyAsync(String resourceGroupName, String networkWatcherName, TopologyParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getTopologyWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters), serviceCallback); } /** @@ -678,12 +886,12 @@ public ServiceFuture getTopologyAsync(String resourceGroupName, S * * @param resourceGroupName The name of the resource group. * @param networkWatcherName The name of the network watcher. - * @param targetResourceGroupName The name of the target resource group to perform topology on. + * @param parameters Parameters that define the representation of topology. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the TopologyInner object */ - public Observable getTopologyAsync(String resourceGroupName, String networkWatcherName, String targetResourceGroupName) { - return getTopologyWithServiceResponseAsync(resourceGroupName, networkWatcherName, targetResourceGroupName).map(new Func1, TopologyInner>() { + public Observable getTopologyAsync(String resourceGroupName, String networkWatcherName, TopologyParameters parameters) { + return getTopologyWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1, TopologyInner>() { @Override public TopologyInner call(ServiceResponse response) { return response.body(); @@ -696,11 +904,11 @@ public TopologyInner call(ServiceResponse response) { * * @param resourceGroupName The name of the resource group. * @param networkWatcherName The name of the network watcher. - * @param targetResourceGroupName The name of the target resource group to perform topology on. + * @param parameters Parameters that define the representation of topology. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the TopologyInner object */ - public Observable> getTopologyWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String targetResourceGroupName) { + public Observable> getTopologyWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, TopologyParameters parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -710,13 +918,12 @@ public Observable> getTopologyWithServiceResponse if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (targetResourceGroupName == null) { - throw new IllegalArgumentException("Parameter targetResourceGroupName is required and cannot be null."); + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } - final String apiVersion = "2017-08-01"; - TopologyParameters parameters = new TopologyParameters(); - parameters.withTargetResourceGroupName(targetResourceGroupName); - return service.getTopology(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + Validator.validate(parameters); + final String apiVersion = "2018-04-01"; + return service.getTopology(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -748,7 +955,7 @@ private ServiceResponse getTopologyDelegate(Response verifyIPFlowAsync(String resourceGroupName, String networkWatcherName, VerificationIPFlowParametersInner parameters, final ServiceCallback serviceCallback) { + public ServiceFuture verifyIPFlowAsync(String resourceGroupName, String networkWatcherName, VerificationIPFlowParameters parameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(verifyIPFlowWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters), serviceCallback); } @@ -775,7 +982,7 @@ public ServiceFuture verifyIPFlowAsync(String res * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable verifyIPFlowAsync(String resourceGroupName, String networkWatcherName, VerificationIPFlowParametersInner parameters) { + public Observable verifyIPFlowAsync(String resourceGroupName, String networkWatcherName, VerificationIPFlowParameters parameters) { return verifyIPFlowWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1, VerificationIPFlowResultInner>() { @Override public VerificationIPFlowResultInner call(ServiceResponse response) { @@ -793,7 +1000,7 @@ public VerificationIPFlowResultInner call(ServiceResponse> verifyIPFlowWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, VerificationIPFlowParametersInner parameters) { + public Observable> verifyIPFlowWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, VerificationIPFlowParameters parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -807,7 +1014,7 @@ public Observable> verifyIPFlowWi throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.verifyIPFlow(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -823,7 +1030,7 @@ public Observable> verifyIPFlowWi * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the VerificationIPFlowResultInner object if successful. */ - public VerificationIPFlowResultInner beginVerifyIPFlow(String resourceGroupName, String networkWatcherName, VerificationIPFlowParametersInner parameters) { + public VerificationIPFlowResultInner beginVerifyIPFlow(String resourceGroupName, String networkWatcherName, VerificationIPFlowParameters parameters) { return beginVerifyIPFlowWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).toBlocking().single().body(); } @@ -837,7 +1044,7 @@ public VerificationIPFlowResultInner beginVerifyIPFlow(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginVerifyIPFlowAsync(String resourceGroupName, String networkWatcherName, VerificationIPFlowParametersInner parameters, final ServiceCallback serviceCallback) { + public ServiceFuture beginVerifyIPFlowAsync(String resourceGroupName, String networkWatcherName, VerificationIPFlowParameters parameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginVerifyIPFlowWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters), serviceCallback); } @@ -850,7 +1057,7 @@ public ServiceFuture beginVerifyIPFlowAsync(Strin * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the VerificationIPFlowResultInner object */ - public Observable beginVerifyIPFlowAsync(String resourceGroupName, String networkWatcherName, VerificationIPFlowParametersInner parameters) { + public Observable beginVerifyIPFlowAsync(String resourceGroupName, String networkWatcherName, VerificationIPFlowParameters parameters) { return beginVerifyIPFlowWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1, VerificationIPFlowResultInner>() { @Override public VerificationIPFlowResultInner call(ServiceResponse response) { @@ -868,7 +1075,7 @@ public VerificationIPFlowResultInner call(ServiceResponse> beginVerifyIPFlowWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, VerificationIPFlowParametersInner parameters) { + public Observable> beginVerifyIPFlowWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, VerificationIPFlowParameters parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -882,7 +1089,7 @@ public Observable> beginVerifyIPF throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginVerifyIPFlow(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -916,7 +1123,7 @@ private ServiceResponse beginVerifyIPFlowDelegate * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the NextHopResultInner object if successful. */ - public NextHopResultInner getNextHop(String resourceGroupName, String networkWatcherName, NextHopParametersInner parameters) { + public NextHopResultInner getNextHop(String resourceGroupName, String networkWatcherName, NextHopParameters parameters) { return getNextHopWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).toBlocking().last().body(); } @@ -930,7 +1137,7 @@ public NextHopResultInner getNextHop(String resourceGroupName, String networkWat * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture getNextHopAsync(String resourceGroupName, String networkWatcherName, NextHopParametersInner parameters, final ServiceCallback serviceCallback) { + public ServiceFuture getNextHopAsync(String resourceGroupName, String networkWatcherName, NextHopParameters parameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(getNextHopWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters), serviceCallback); } @@ -943,7 +1150,7 @@ public ServiceFuture getNextHopAsync(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable getNextHopAsync(String resourceGroupName, String networkWatcherName, NextHopParametersInner parameters) { + public Observable getNextHopAsync(String resourceGroupName, String networkWatcherName, NextHopParameters parameters) { return getNextHopWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1, NextHopResultInner>() { @Override public NextHopResultInner call(ServiceResponse response) { @@ -961,7 +1168,7 @@ public NextHopResultInner call(ServiceResponse response) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable> getNextHopWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, NextHopParametersInner parameters) { + public Observable> getNextHopWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, NextHopParameters parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -975,7 +1182,7 @@ public Observable> getNextHopWithServiceResp throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.getNextHop(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -991,7 +1198,7 @@ public Observable> getNextHopWithServiceResp * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the NextHopResultInner object if successful. */ - public NextHopResultInner beginGetNextHop(String resourceGroupName, String networkWatcherName, NextHopParametersInner parameters) { + public NextHopResultInner beginGetNextHop(String resourceGroupName, String networkWatcherName, NextHopParameters parameters) { return beginGetNextHopWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).toBlocking().single().body(); } @@ -1005,7 +1212,7 @@ public NextHopResultInner beginGetNextHop(String resourceGroupName, String netwo * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginGetNextHopAsync(String resourceGroupName, String networkWatcherName, NextHopParametersInner parameters, final ServiceCallback serviceCallback) { + public ServiceFuture beginGetNextHopAsync(String resourceGroupName, String networkWatcherName, NextHopParameters parameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginGetNextHopWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters), serviceCallback); } @@ -1018,7 +1225,7 @@ public ServiceFuture beginGetNextHopAsync(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the NextHopResultInner object */ - public Observable beginGetNextHopAsync(String resourceGroupName, String networkWatcherName, NextHopParametersInner parameters) { + public Observable beginGetNextHopAsync(String resourceGroupName, String networkWatcherName, NextHopParameters parameters) { return beginGetNextHopWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1, NextHopResultInner>() { @Override public NextHopResultInner call(ServiceResponse response) { @@ -1036,7 +1243,7 @@ public NextHopResultInner call(ServiceResponse response) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the NextHopResultInner object */ - public Observable> beginGetNextHopWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, NextHopParametersInner parameters) { + public Observable> beginGetNextHopWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, NextHopParameters parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1050,7 +1257,7 @@ public Observable> beginGetNextHopWithServic throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginGetNextHop(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1142,7 +1349,7 @@ public Observable> getVMSecurityRu if (targetResourceId == null) { throw new IllegalArgumentException("Parameter targetResourceId is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; SecurityGroupViewParameters parameters = new SecurityGroupViewParameters(); parameters.withTargetResourceId(targetResourceId); Observable> observable = service.getVMSecurityRules(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); @@ -1218,7 +1425,7 @@ public Observable> beginGetVMSecur if (targetResourceId == null) { throw new IllegalArgumentException("Parameter targetResourceId is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; SecurityGroupViewParameters parameters = new SecurityGroupViewParameters(); parameters.withTargetResourceId(targetResourceId); return service.beginGetVMSecurityRules(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) @@ -1254,7 +1461,7 @@ private ServiceResponse beginGetVMSecurityRulesDel * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the TroubleshootingResultInner object if successful. */ - public TroubleshootingResultInner getTroubleshooting(String resourceGroupName, String networkWatcherName, TroubleshootingParametersInner parameters) { + public TroubleshootingResultInner getTroubleshooting(String resourceGroupName, String networkWatcherName, TroubleshootingParameters parameters) { return getTroubleshootingWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).toBlocking().last().body(); } @@ -1268,7 +1475,7 @@ public TroubleshootingResultInner getTroubleshooting(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture getTroubleshootingAsync(String resourceGroupName, String networkWatcherName, TroubleshootingParametersInner parameters, final ServiceCallback serviceCallback) { + public ServiceFuture getTroubleshootingAsync(String resourceGroupName, String networkWatcherName, TroubleshootingParameters parameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(getTroubleshootingWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters), serviceCallback); } @@ -1281,7 +1488,7 @@ public ServiceFuture getTroubleshootingAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable getTroubleshootingAsync(String resourceGroupName, String networkWatcherName, TroubleshootingParametersInner parameters) { + public Observable getTroubleshootingAsync(String resourceGroupName, String networkWatcherName, TroubleshootingParameters parameters) { return getTroubleshootingWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1, TroubleshootingResultInner>() { @Override public TroubleshootingResultInner call(ServiceResponse response) { @@ -1299,7 +1506,7 @@ public TroubleshootingResultInner call(ServiceResponse> getTroubleshootingWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, TroubleshootingParametersInner parameters) { + public Observable> getTroubleshootingWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, TroubleshootingParameters parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1313,7 +1520,7 @@ public Observable> getTroubleshootin throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.getTroubleshooting(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -1329,7 +1536,7 @@ public Observable> getTroubleshootin * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the TroubleshootingResultInner object if successful. */ - public TroubleshootingResultInner beginGetTroubleshooting(String resourceGroupName, String networkWatcherName, TroubleshootingParametersInner parameters) { + public TroubleshootingResultInner beginGetTroubleshooting(String resourceGroupName, String networkWatcherName, TroubleshootingParameters parameters) { return beginGetTroubleshootingWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).toBlocking().single().body(); } @@ -1343,7 +1550,7 @@ public TroubleshootingResultInner beginGetTroubleshooting(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginGetTroubleshootingAsync(String resourceGroupName, String networkWatcherName, TroubleshootingParametersInner parameters, final ServiceCallback serviceCallback) { + public ServiceFuture beginGetTroubleshootingAsync(String resourceGroupName, String networkWatcherName, TroubleshootingParameters parameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginGetTroubleshootingWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters), serviceCallback); } @@ -1356,7 +1563,7 @@ public ServiceFuture beginGetTroubleshootingAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the TroubleshootingResultInner object */ - public Observable beginGetTroubleshootingAsync(String resourceGroupName, String networkWatcherName, TroubleshootingParametersInner parameters) { + public Observable beginGetTroubleshootingAsync(String resourceGroupName, String networkWatcherName, TroubleshootingParameters parameters) { return beginGetTroubleshootingWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1, TroubleshootingResultInner>() { @Override public TroubleshootingResultInner call(ServiceResponse response) { @@ -1374,7 +1581,7 @@ public TroubleshootingResultInner call(ServiceResponse> beginGetTroubleshootingWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, TroubleshootingParametersInner parameters) { + public Observable> beginGetTroubleshootingWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, TroubleshootingParameters parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1388,7 +1595,7 @@ public Observable> beginGetTroublesh throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginGetTroubleshooting(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1480,7 +1687,7 @@ public Observable> getTroubleshootin if (targetResourceId == null) { throw new IllegalArgumentException("Parameter targetResourceId is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; QueryTroubleshootingParameters parameters = new QueryTroubleshootingParameters(); parameters.withTargetResourceId(targetResourceId); Observable> observable = service.getTroubleshootingResult(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); @@ -1556,7 +1763,7 @@ public Observable> beginGetTroublesh if (targetResourceId == null) { throw new IllegalArgumentException("Parameter targetResourceId is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; QueryTroubleshootingParameters parameters = new QueryTroubleshootingParameters(); parameters.withTargetResourceId(targetResourceId); return service.beginGetTroubleshootingResult(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) @@ -1582,7 +1789,7 @@ private ServiceResponse beginGetTroubleshootingResul } /** - * Configures flow log on a specified resource. + * Configures flow log and traffic analytics (optional) on a specified resource. * * @param resourceGroupName The name of the network watcher resource group. * @param networkWatcherName The name of the network watcher resource. @@ -1597,7 +1804,7 @@ public FlowLogInformationInner setFlowLogConfiguration(String resourceGroupName, } /** - * Configures flow log on a specified resource. + * Configures flow log and traffic analytics (optional) on a specified resource. * * @param resourceGroupName The name of the network watcher resource group. * @param networkWatcherName The name of the network watcher resource. @@ -1611,7 +1818,7 @@ public ServiceFuture setFlowLogConfigurationAsync(Strin } /** - * Configures flow log on a specified resource. + * Configures flow log and traffic analytics (optional) on a specified resource. * * @param resourceGroupName The name of the network watcher resource group. * @param networkWatcherName The name of the network watcher resource. @@ -1629,7 +1836,7 @@ public FlowLogInformationInner call(ServiceResponse res } /** - * Configures flow log on a specified resource. + * Configures flow log and traffic analytics (optional) on a specified resource. * * @param resourceGroupName The name of the network watcher resource group. * @param networkWatcherName The name of the network watcher resource. @@ -1651,13 +1858,13 @@ public Observable> setFlowLogConfigurat throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.setFlowLogConfiguration(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** - * Configures flow log on a specified resource. + * Configures flow log and traffic analytics (optional) on a specified resource. * * @param resourceGroupName The name of the network watcher resource group. * @param networkWatcherName The name of the network watcher resource. @@ -1672,7 +1879,7 @@ public FlowLogInformationInner beginSetFlowLogConfiguration(String resourceGroup } /** - * Configures flow log on a specified resource. + * Configures flow log and traffic analytics (optional) on a specified resource. * * @param resourceGroupName The name of the network watcher resource group. * @param networkWatcherName The name of the network watcher resource. @@ -1686,7 +1893,7 @@ public ServiceFuture beginSetFlowLogConfigurationAsync( } /** - * Configures flow log on a specified resource. + * Configures flow log and traffic analytics (optional) on a specified resource. * * @param resourceGroupName The name of the network watcher resource group. * @param networkWatcherName The name of the network watcher resource. @@ -1704,7 +1911,7 @@ public FlowLogInformationInner call(ServiceResponse res } /** - * Configures flow log on a specified resource. + * Configures flow log and traffic analytics (optional) on a specified resource. * * @param resourceGroupName The name of the network watcher resource group. * @param networkWatcherName The name of the network watcher resource. @@ -1726,7 +1933,7 @@ public Observable> beginSetFlowLogConfi throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginSetFlowLogConfiguration(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1750,11 +1957,11 @@ private ServiceResponse beginSetFlowLogConfigurationDel } /** - * Queries status of flow log on a specified resource. + * Queries status of flow log and traffic analytics (optional) on a specified resource. * * @param resourceGroupName The name of the network watcher resource group. * @param networkWatcherName The name of the network watcher resource. - * @param targetResourceId The target resource where getting the flow logging status. + * @param targetResourceId The target resource where getting the flow log and traffic analytics (optional) status. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent @@ -1765,11 +1972,11 @@ public FlowLogInformationInner getFlowLogStatus(String resourceGroupName, String } /** - * Queries status of flow log on a specified resource. + * Queries status of flow log and traffic analytics (optional) on a specified resource. * * @param resourceGroupName The name of the network watcher resource group. * @param networkWatcherName The name of the network watcher resource. - * @param targetResourceId The target resource where getting the flow logging status. + * @param targetResourceId The target resource where getting the flow log and traffic analytics (optional) status. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object @@ -1779,11 +1986,11 @@ public ServiceFuture getFlowLogStatusAsync(String resou } /** - * Queries status of flow log on a specified resource. + * Queries status of flow log and traffic analytics (optional) on a specified resource. * * @param resourceGroupName The name of the network watcher resource group. * @param networkWatcherName The name of the network watcher resource. - * @param targetResourceId The target resource where getting the flow logging status. + * @param targetResourceId The target resource where getting the flow log and traffic analytics (optional) status. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ @@ -1797,11 +2004,11 @@ public FlowLogInformationInner call(ServiceResponse res } /** - * Queries status of flow log on a specified resource. + * Queries status of flow log and traffic analytics (optional) on a specified resource. * * @param resourceGroupName The name of the network watcher resource group. * @param networkWatcherName The name of the network watcher resource. - * @param targetResourceId The target resource where getting the flow logging status. + * @param targetResourceId The target resource where getting the flow log and traffic analytics (optional) status. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ @@ -1818,7 +2025,7 @@ public Observable> getFlowLogStatusWith if (targetResourceId == null) { throw new IllegalArgumentException("Parameter targetResourceId is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; FlowLogStatusParameters parameters = new FlowLogStatusParameters(); parameters.withTargetResourceId(targetResourceId); Observable> observable = service.getFlowLogStatus(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); @@ -1826,11 +2033,11 @@ public Observable> getFlowLogStatusWith } /** - * Queries status of flow log on a specified resource. + * Queries status of flow log and traffic analytics (optional) on a specified resource. * * @param resourceGroupName The name of the network watcher resource group. * @param networkWatcherName The name of the network watcher resource. - * @param targetResourceId The target resource where getting the flow logging status. + * @param targetResourceId The target resource where getting the flow log and traffic analytics (optional) status. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent @@ -1841,11 +2048,11 @@ public FlowLogInformationInner beginGetFlowLogStatus(String resourceGroupName, S } /** - * Queries status of flow log on a specified resource. + * Queries status of flow log and traffic analytics (optional) on a specified resource. * * @param resourceGroupName The name of the network watcher resource group. * @param networkWatcherName The name of the network watcher resource. - * @param targetResourceId The target resource where getting the flow logging status. + * @param targetResourceId The target resource where getting the flow log and traffic analytics (optional) status. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object @@ -1855,11 +2062,11 @@ public ServiceFuture beginGetFlowLogStatusAsync(String } /** - * Queries status of flow log on a specified resource. + * Queries status of flow log and traffic analytics (optional) on a specified resource. * * @param resourceGroupName The name of the network watcher resource group. * @param networkWatcherName The name of the network watcher resource. - * @param targetResourceId The target resource where getting the flow logging status. + * @param targetResourceId The target resource where getting the flow log and traffic analytics (optional) status. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the FlowLogInformationInner object */ @@ -1873,11 +2080,11 @@ public FlowLogInformationInner call(ServiceResponse res } /** - * Queries status of flow log on a specified resource. + * Queries status of flow log and traffic analytics (optional) on a specified resource. * * @param resourceGroupName The name of the network watcher resource group. * @param networkWatcherName The name of the network watcher resource. - * @param targetResourceId The target resource where getting the flow logging status. + * @param targetResourceId The target resource where getting the flow log and traffic analytics (optional) status. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the FlowLogInformationInner object */ @@ -1894,7 +2101,7 @@ public Observable> beginGetFlowLogStatu if (targetResourceId == null) { throw new IllegalArgumentException("Parameter targetResourceId is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; FlowLogStatusParameters parameters = new FlowLogStatusParameters(); parameters.withTargetResourceId(targetResourceId); return service.beginGetFlowLogStatus(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) @@ -1930,7 +2137,7 @@ private ServiceResponse beginGetFlowLogStatusDelegate(R * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the ConnectivityInformationInner object if successful. */ - public ConnectivityInformationInner checkConnectivity(String resourceGroupName, String networkWatcherName, ConnectivityParametersInner parameters) { + public ConnectivityInformationInner checkConnectivity(String resourceGroupName, String networkWatcherName, ConnectivityParameters parameters) { return checkConnectivityWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).toBlocking().last().body(); } @@ -1944,7 +2151,7 @@ public ConnectivityInformationInner checkConnectivity(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture checkConnectivityAsync(String resourceGroupName, String networkWatcherName, ConnectivityParametersInner parameters, final ServiceCallback serviceCallback) { + public ServiceFuture checkConnectivityAsync(String resourceGroupName, String networkWatcherName, ConnectivityParameters parameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(checkConnectivityWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters), serviceCallback); } @@ -1957,7 +2164,7 @@ public ServiceFuture checkConnectivityAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable checkConnectivityAsync(String resourceGroupName, String networkWatcherName, ConnectivityParametersInner parameters) { + public Observable checkConnectivityAsync(String resourceGroupName, String networkWatcherName, ConnectivityParameters parameters) { return checkConnectivityWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1, ConnectivityInformationInner>() { @Override public ConnectivityInformationInner call(ServiceResponse response) { @@ -1975,7 +2182,7 @@ public ConnectivityInformationInner call(ServiceResponse> checkConnectivityWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, ConnectivityParametersInner parameters) { + public Observable> checkConnectivityWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, ConnectivityParameters parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1989,7 +2196,7 @@ public Observable> checkConnectivi throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.checkConnectivity(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -2005,7 +2212,7 @@ public Observable> checkConnectivi * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the ConnectivityInformationInner object if successful. */ - public ConnectivityInformationInner beginCheckConnectivity(String resourceGroupName, String networkWatcherName, ConnectivityParametersInner parameters) { + public ConnectivityInformationInner beginCheckConnectivity(String resourceGroupName, String networkWatcherName, ConnectivityParameters parameters) { return beginCheckConnectivityWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).toBlocking().single().body(); } @@ -2019,7 +2226,7 @@ public ConnectivityInformationInner beginCheckConnectivity(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginCheckConnectivityAsync(String resourceGroupName, String networkWatcherName, ConnectivityParametersInner parameters, final ServiceCallback serviceCallback) { + public ServiceFuture beginCheckConnectivityAsync(String resourceGroupName, String networkWatcherName, ConnectivityParameters parameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginCheckConnectivityWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters), serviceCallback); } @@ -2032,7 +2239,7 @@ public ServiceFuture beginCheckConnectivityAsync(S * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ConnectivityInformationInner object */ - public Observable beginCheckConnectivityAsync(String resourceGroupName, String networkWatcherName, ConnectivityParametersInner parameters) { + public Observable beginCheckConnectivityAsync(String resourceGroupName, String networkWatcherName, ConnectivityParameters parameters) { return beginCheckConnectivityWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1, ConnectivityInformationInner>() { @Override public ConnectivityInformationInner call(ServiceResponse response) { @@ -2050,7 +2257,7 @@ public ConnectivityInformationInner call(ServiceResponse> beginCheckConnectivityWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, ConnectivityParametersInner parameters) { + public Observable> beginCheckConnectivityWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, ConnectivityParameters parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2064,7 +2271,7 @@ public Observable> beginCheckConne throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginCheckConnectivity(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -2087,4 +2294,340 @@ private ServiceResponse beginCheckConnectivityDele .build(response); } + /** + * Gets the relative latency score for internet service providers from a specified location to Azure regions. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that determine Azure reachability report configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the AzureReachabilityReportInner object if successful. + */ + public AzureReachabilityReportInner getAzureReachabilityReport(String resourceGroupName, String networkWatcherName, AzureReachabilityReportParameters parameters) { + return getAzureReachabilityReportWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).toBlocking().last().body(); + } + + /** + * Gets the relative latency score for internet service providers from a specified location to Azure regions. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that determine Azure reachability report configuration. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAzureReachabilityReportAsync(String resourceGroupName, String networkWatcherName, AzureReachabilityReportParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getAzureReachabilityReportWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters), serviceCallback); + } + + /** + * Gets the relative latency score for internet service providers from a specified location to Azure regions. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that determine Azure reachability report configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable getAzureReachabilityReportAsync(String resourceGroupName, String networkWatcherName, AzureReachabilityReportParameters parameters) { + return getAzureReachabilityReportWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1, AzureReachabilityReportInner>() { + @Override + public AzureReachabilityReportInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the relative latency score for internet service providers from a specified location to Azure regions. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that determine Azure reachability report configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> getAzureReachabilityReportWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, AzureReachabilityReportParameters parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2018-04-01"; + Observable> observable = service.getAzureReachabilityReport(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Gets the relative latency score for internet service providers from a specified location to Azure regions. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that determine Azure reachability report configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the AzureReachabilityReportInner object if successful. + */ + public AzureReachabilityReportInner beginGetAzureReachabilityReport(String resourceGroupName, String networkWatcherName, AzureReachabilityReportParameters parameters) { + return beginGetAzureReachabilityReportWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).toBlocking().single().body(); + } + + /** + * Gets the relative latency score for internet service providers from a specified location to Azure regions. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that determine Azure reachability report configuration. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginGetAzureReachabilityReportAsync(String resourceGroupName, String networkWatcherName, AzureReachabilityReportParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginGetAzureReachabilityReportWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters), serviceCallback); + } + + /** + * Gets the relative latency score for internet service providers from a specified location to Azure regions. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that determine Azure reachability report configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AzureReachabilityReportInner object + */ + public Observable beginGetAzureReachabilityReportAsync(String resourceGroupName, String networkWatcherName, AzureReachabilityReportParameters parameters) { + return beginGetAzureReachabilityReportWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1, AzureReachabilityReportInner>() { + @Override + public AzureReachabilityReportInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the relative latency score for internet service providers from a specified location to Azure regions. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that determine Azure reachability report configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AzureReachabilityReportInner object + */ + public Observable> beginGetAzureReachabilityReportWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, AzureReachabilityReportParameters parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2018-04-01"; + return service.beginGetAzureReachabilityReport(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginGetAzureReachabilityReportDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginGetAzureReachabilityReportDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists all available internet service providers for a specified Azure region. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that scope the list of available providers. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the AvailableProvidersListInner object if successful. + */ + public AvailableProvidersListInner listAvailableProviders(String resourceGroupName, String networkWatcherName, AvailableProvidersListParameters parameters) { + return listAvailableProvidersWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).toBlocking().last().body(); + } + + /** + * Lists all available internet service providers for a specified Azure region. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that scope the list of available providers. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listAvailableProvidersAsync(String resourceGroupName, String networkWatcherName, AvailableProvidersListParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listAvailableProvidersWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters), serviceCallback); + } + + /** + * Lists all available internet service providers for a specified Azure region. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that scope the list of available providers. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable listAvailableProvidersAsync(String resourceGroupName, String networkWatcherName, AvailableProvidersListParameters parameters) { + return listAvailableProvidersWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1, AvailableProvidersListInner>() { + @Override + public AvailableProvidersListInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Lists all available internet service providers for a specified Azure region. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that scope the list of available providers. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> listAvailableProvidersWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, AvailableProvidersListParameters parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2018-04-01"; + Observable> observable = service.listAvailableProviders(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Lists all available internet service providers for a specified Azure region. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that scope the list of available providers. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the AvailableProvidersListInner object if successful. + */ + public AvailableProvidersListInner beginListAvailableProviders(String resourceGroupName, String networkWatcherName, AvailableProvidersListParameters parameters) { + return beginListAvailableProvidersWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).toBlocking().single().body(); + } + + /** + * Lists all available internet service providers for a specified Azure region. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that scope the list of available providers. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginListAvailableProvidersAsync(String resourceGroupName, String networkWatcherName, AvailableProvidersListParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginListAvailableProvidersWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters), serviceCallback); + } + + /** + * Lists all available internet service providers for a specified Azure region. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that scope the list of available providers. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AvailableProvidersListInner object + */ + public Observable beginListAvailableProvidersAsync(String resourceGroupName, String networkWatcherName, AvailableProvidersListParameters parameters) { + return beginListAvailableProvidersWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1, AvailableProvidersListInner>() { + @Override + public AvailableProvidersListInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Lists all available internet service providers for a specified Azure region. + * + * @param resourceGroupName The name of the network watcher resource group. + * @param networkWatcherName The name of the network watcher resource. + * @param parameters Parameters that scope the list of available providers. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AvailableProvidersListInner object + */ + public Observable> beginListAvailableProvidersWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, AvailableProvidersListParameters parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2018-04-01"; + return service.beginListAvailableProviders(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginListAvailableProvidersDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginListAvailableProvidersDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NextHopResultInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NextHopResultInner.java index 5e51fceb175..9b71ab30f12 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NextHopResultInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NextHopResultInner.java @@ -37,7 +37,7 @@ public class NextHopResultInner { private String routeTableId; /** - * Get the nextHopType value. + * Get next hop type. Possible values include: 'Internet', 'VirtualAppliance', 'VirtualNetworkGateway', 'VnetLocal', 'HyperNetGateway', 'None'. * * @return the nextHopType value */ @@ -46,7 +46,7 @@ public NextHopType nextHopType() { } /** - * Set the nextHopType value. + * Set next hop type. Possible values include: 'Internet', 'VirtualAppliance', 'VirtualNetworkGateway', 'VnetLocal', 'HyperNetGateway', 'None'. * * @param nextHopType the nextHopType value to set * @return the NextHopResultInner object itself. @@ -57,7 +57,7 @@ public NextHopResultInner withNextHopType(NextHopType nextHopType) { } /** - * Get the nextHopIpAddress value. + * Get next hop IP Address. * * @return the nextHopIpAddress value */ @@ -66,7 +66,7 @@ public String nextHopIpAddress() { } /** - * Set the nextHopIpAddress value. + * Set next hop IP Address. * * @param nextHopIpAddress the nextHopIpAddress value to set * @return the NextHopResultInner object itself. @@ -77,7 +77,7 @@ public NextHopResultInner withNextHopIpAddress(String nextHopIpAddress) { } /** - * Get the routeTableId value. + * Get the resource identifier for the route table associated with the route being returned. If the route being returned does not correspond to any user created routes then this field will be the string 'System Route'. * * @return the routeTableId value */ @@ -86,7 +86,7 @@ public String routeTableId() { } /** - * Set the routeTableId value. + * Set the resource identifier for the route table associated with the route being returned. If the route being returned does not correspond to any user created routes then this field will be the string 'System Route'. * * @param routeTableId the routeTableId value to set * @return the NextHopResultInner object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/OperationInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/OperationInner.java new file mode 100644 index 00000000000..922d53ceab5 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/OperationInner.java @@ -0,0 +1,125 @@ +/** + * 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.network.implementation; + +import com.microsoft.azure.management.network.OperationDisplay; +import com.microsoft.azure.management.network.OperationPropertiesFormatServiceSpecification; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Network REST API operation definition. + */ +@JsonFlatten +public class OperationInner { + /** + * Operation name: {provider}/{resource}/{operation}. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Display metadata associated with the operation. + */ + @JsonProperty(value = "display") + private OperationDisplay display; + + /** + * Origin of the operation. + */ + @JsonProperty(value = "origin") + private String origin; + + /** + * Specification of the service. + */ + @JsonProperty(value = "properties.serviceSpecification") + private OperationPropertiesFormatServiceSpecification serviceSpecification; + + /** + * Get operation name: {provider}/{resource}/{operation}. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set operation name: {provider}/{resource}/{operation}. + * + * @param name the name value to set + * @return the OperationInner object itself. + */ + public OperationInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get display metadata associated with the operation. + * + * @return the display value + */ + public OperationDisplay display() { + return this.display; + } + + /** + * Set display metadata associated with the operation. + * + * @param display the display value to set + * @return the OperationInner object itself. + */ + public OperationInner withDisplay(OperationDisplay display) { + this.display = display; + return this; + } + + /** + * Get origin of the operation. + * + * @return the origin value + */ + public String origin() { + return this.origin; + } + + /** + * Set origin of the operation. + * + * @param origin the origin value to set + * @return the OperationInner object itself. + */ + public OperationInner withOrigin(String origin) { + this.origin = origin; + return this; + } + + /** + * Get specification of the service. + * + * @return the serviceSpecification value + */ + public OperationPropertiesFormatServiceSpecification serviceSpecification() { + return this.serviceSpecification; + } + + /** + * Set specification of the service. + * + * @param serviceSpecification the serviceSpecification value to set + * @return the OperationInner object itself. + */ + public OperationInner withServiceSpecification(OperationPropertiesFormatServiceSpecification serviceSpecification) { + this.serviceSpecification = serviceSpecification; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/OperationsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/OperationsInner.java new file mode 100644 index 00000000000..794f9c5f7aa --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/OperationsInner.java @@ -0,0 +1,281 @@ +/** + * 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.network.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Operations. + */ +public class OperationsInner { + /** The Retrofit service to perform REST calls. */ + private OperationsService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of OperationsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public OperationsInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(OperationsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Operations to be + * used by Retrofit to perform actually REST calls. + */ + interface OperationsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.Operations list" }) + @GET("providers/Microsoft.Network/operations") + Observable> list(@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.network.Operations listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Lists all of the available Network Rest API operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<OperationInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all of the available Network Rest API operations. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all of the available Network Rest API operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OperationInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all of the available Network Rest API operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OperationInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all of the available Network Rest API operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<OperationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + final String apiVersion = "2018-04-01"; + return service.list(apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists all of the available Network Rest API operations. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<OperationInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all of the available Network Rest API operations. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all of the available Network Rest API operations. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OperationInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all of the available Network Rest API operations. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OperationInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all of the available Network Rest API operations. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<OperationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/OutboundNatRuleInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/OutboundNatRuleInner.java index b490c7356f8..f4a9a9d7b3b 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/OutboundNatRuleInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/OutboundNatRuleInner.java @@ -58,7 +58,7 @@ public class OutboundNatRuleInner extends SubResource { private String etag; /** - * Get the allocatedOutboundPorts value. + * Get the number of outbound ports to be used for NAT. * * @return the allocatedOutboundPorts value */ @@ -67,7 +67,7 @@ public Integer allocatedOutboundPorts() { } /** - * Set the allocatedOutboundPorts value. + * Set the number of outbound ports to be used for NAT. * * @param allocatedOutboundPorts the allocatedOutboundPorts value to set * @return the OutboundNatRuleInner object itself. @@ -78,7 +78,7 @@ public OutboundNatRuleInner withAllocatedOutboundPorts(Integer allocatedOutbound } /** - * Get the frontendIPConfigurations value. + * Get the Frontend IP addresses of the load balancer. * * @return the frontendIPConfigurations value */ @@ -87,7 +87,7 @@ public List frontendIPConfigurations() { } /** - * Set the frontendIPConfigurations value. + * Set the Frontend IP addresses of the load balancer. * * @param frontendIPConfigurations the frontendIPConfigurations value to set * @return the OutboundNatRuleInner object itself. @@ -98,7 +98,7 @@ public OutboundNatRuleInner withFrontendIPConfigurations(List front } /** - * Get the backendAddressPool value. + * Get a reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs. * * @return the backendAddressPool value */ @@ -107,7 +107,7 @@ public SubResource backendAddressPool() { } /** - * Set the backendAddressPool value. + * Set a reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs. * * @param backendAddressPool the backendAddressPool value to set * @return the OutboundNatRuleInner object itself. @@ -118,7 +118,7 @@ public OutboundNatRuleInner withBackendAddressPool(SubResource backendAddressPoo } /** - * Get the provisioningState value. + * Get gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. * * @return the provisioningState value */ @@ -127,7 +127,7 @@ public String provisioningState() { } /** - * Set the provisioningState value. + * Set gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. * * @param provisioningState the provisioningState value to set * @return the OutboundNatRuleInner object itself. @@ -138,7 +138,7 @@ public OutboundNatRuleInner withProvisioningState(String provisioningState) { } /** - * Get the name value. + * Get the name of the resource that is unique within a resource group. This name can be used to access the resource. * * @return the name value */ @@ -147,7 +147,7 @@ public String name() { } /** - * Set the name value. + * Set the name of the resource that is unique within a resource group. This name can be used to access the resource. * * @param name the name value to set * @return the OutboundNatRuleInner object itself. @@ -158,7 +158,7 @@ public OutboundNatRuleInner withName(String name) { } /** - * Get the etag value. + * Get a unique read-only string that changes whenever the resource is updated. * * @return the etag value */ @@ -167,7 +167,7 @@ public String etag() { } /** - * Set the etag value. + * Set a unique read-only string that changes whenever the resource is updated. * * @param etag the etag value to set * @return the OutboundNatRuleInner object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PacketCaptureInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PacketCaptureInner.java index 07191430d4f..1a0b02ad79f 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PacketCaptureInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PacketCaptureInner.java @@ -56,7 +56,7 @@ public class PacketCaptureInner { private List filters; /** - * Get the target value. + * Get the ID of the targeted resource, only VM is currently supported. * * @return the target value */ @@ -65,7 +65,7 @@ public String target() { } /** - * Set the target value. + * Set the ID of the targeted resource, only VM is currently supported. * * @param target the target value to set * @return the PacketCaptureInner object itself. @@ -76,7 +76,7 @@ public PacketCaptureInner withTarget(String target) { } /** - * Get the bytesToCapturePerPacket value. + * Get number of bytes captured per packet, the remaining bytes are truncated. * * @return the bytesToCapturePerPacket value */ @@ -85,7 +85,7 @@ public Integer bytesToCapturePerPacket() { } /** - * Set the bytesToCapturePerPacket value. + * Set number of bytes captured per packet, the remaining bytes are truncated. * * @param bytesToCapturePerPacket the bytesToCapturePerPacket value to set * @return the PacketCaptureInner object itself. @@ -96,7 +96,7 @@ public PacketCaptureInner withBytesToCapturePerPacket(Integer bytesToCapturePerP } /** - * Get the totalBytesPerSession value. + * Get maximum size of the capture output. * * @return the totalBytesPerSession value */ @@ -105,7 +105,7 @@ public Integer totalBytesPerSession() { } /** - * Set the totalBytesPerSession value. + * Set maximum size of the capture output. * * @param totalBytesPerSession the totalBytesPerSession value to set * @return the PacketCaptureInner object itself. @@ -116,7 +116,7 @@ public PacketCaptureInner withTotalBytesPerSession(Integer totalBytesPerSession) } /** - * Get the timeLimitInSeconds value. + * Get maximum duration of the capture session in seconds. * * @return the timeLimitInSeconds value */ @@ -125,7 +125,7 @@ public Integer timeLimitInSeconds() { } /** - * Set the timeLimitInSeconds value. + * Set maximum duration of the capture session in seconds. * * @param timeLimitInSeconds the timeLimitInSeconds value to set * @return the PacketCaptureInner object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PacketCaptureQueryStatusResultInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PacketCaptureQueryStatusResultInner.java index 707203c3378..951fc34f5b4 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PacketCaptureQueryStatusResultInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PacketCaptureQueryStatusResultInner.java @@ -56,7 +56,7 @@ public class PacketCaptureQueryStatusResultInner { private List packetCaptureError; /** - * Get the name value. + * Get the name of the packet capture resource. * * @return the name value */ @@ -65,7 +65,7 @@ public String name() { } /** - * Set the name value. + * Set the name of the packet capture resource. * * @param name the name value to set * @return the PacketCaptureQueryStatusResultInner object itself. @@ -76,7 +76,7 @@ public PacketCaptureQueryStatusResultInner withName(String name) { } /** - * Get the id value. + * Get the ID of the packet capture resource. * * @return the id value */ @@ -85,7 +85,7 @@ public String id() { } /** - * Set the id value. + * Set the ID of the packet capture resource. * * @param id the id value to set * @return the PacketCaptureQueryStatusResultInner object itself. @@ -96,7 +96,7 @@ public PacketCaptureQueryStatusResultInner withId(String id) { } /** - * Get the captureStartTime value. + * Get the start time of the packet capture session. * * @return the captureStartTime value */ @@ -105,7 +105,7 @@ public DateTime captureStartTime() { } /** - * Set the captureStartTime value. + * Set the start time of the packet capture session. * * @param captureStartTime the captureStartTime value to set * @return the PacketCaptureQueryStatusResultInner object itself. @@ -116,7 +116,7 @@ public PacketCaptureQueryStatusResultInner withCaptureStartTime(DateTime capture } /** - * Get the packetCaptureStatus value. + * Get the status of the packet capture session. Possible values include: 'NotStarted', 'Running', 'Stopped', 'Error', 'Unknown'. * * @return the packetCaptureStatus value */ @@ -125,7 +125,7 @@ public PcStatus packetCaptureStatus() { } /** - * Set the packetCaptureStatus value. + * Set the status of the packet capture session. Possible values include: 'NotStarted', 'Running', 'Stopped', 'Error', 'Unknown'. * * @param packetCaptureStatus the packetCaptureStatus value to set * @return the PacketCaptureQueryStatusResultInner object itself. @@ -136,7 +136,7 @@ public PacketCaptureQueryStatusResultInner withPacketCaptureStatus(PcStatus pack } /** - * Get the stopReason value. + * Get the reason the current packet capture session was stopped. * * @return the stopReason value */ @@ -145,7 +145,7 @@ public String stopReason() { } /** - * Set the stopReason value. + * Set the reason the current packet capture session was stopped. * * @param stopReason the stopReason value to set * @return the PacketCaptureQueryStatusResultInner object itself. @@ -156,7 +156,7 @@ public PacketCaptureQueryStatusResultInner withStopReason(String stopReason) { } /** - * Get the packetCaptureError value. + * Get list of errors of packet capture session. * * @return the packetCaptureError value */ @@ -165,7 +165,7 @@ public List packetCaptureError() { } /** - * Set the packetCaptureError value. + * Set list of errors of packet capture session. * * @param packetCaptureError the packetCaptureError value to set * @return the PacketCaptureQueryStatusResultInner object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PacketCaptureResultInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PacketCaptureResultInner.java index 8dee161afd1..5c74f37c45b 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PacketCaptureResultInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PacketCaptureResultInner.java @@ -82,7 +82,7 @@ public class PacketCaptureResultInner { private ProvisioningState provisioningState; /** - * Get the name value. + * Get name of the packet capture session. * * @return the name value */ @@ -91,7 +91,7 @@ public String name() { } /** - * Get the id value. + * Get iD of the packet capture operation. * * @return the id value */ @@ -120,7 +120,7 @@ public PacketCaptureResultInner withEtag(String etag) { } /** - * Get the target value. + * Get the ID of the targeted resource, only VM is currently supported. * * @return the target value */ @@ -129,7 +129,7 @@ public String target() { } /** - * Set the target value. + * Set the ID of the targeted resource, only VM is currently supported. * * @param target the target value to set * @return the PacketCaptureResultInner object itself. @@ -140,7 +140,7 @@ public PacketCaptureResultInner withTarget(String target) { } /** - * Get the bytesToCapturePerPacket value. + * Get number of bytes captured per packet, the remaining bytes are truncated. * * @return the bytesToCapturePerPacket value */ @@ -149,7 +149,7 @@ public Integer bytesToCapturePerPacket() { } /** - * Set the bytesToCapturePerPacket value. + * Set number of bytes captured per packet, the remaining bytes are truncated. * * @param bytesToCapturePerPacket the bytesToCapturePerPacket value to set * @return the PacketCaptureResultInner object itself. @@ -160,7 +160,7 @@ public PacketCaptureResultInner withBytesToCapturePerPacket(Integer bytesToCaptu } /** - * Get the totalBytesPerSession value. + * Get maximum size of the capture output. * * @return the totalBytesPerSession value */ @@ -169,7 +169,7 @@ public Integer totalBytesPerSession() { } /** - * Set the totalBytesPerSession value. + * Set maximum size of the capture output. * * @param totalBytesPerSession the totalBytesPerSession value to set * @return the PacketCaptureResultInner object itself. @@ -180,7 +180,7 @@ public PacketCaptureResultInner withTotalBytesPerSession(Integer totalBytesPerSe } /** - * Get the timeLimitInSeconds value. + * Get maximum duration of the capture session in seconds. * * @return the timeLimitInSeconds value */ @@ -189,7 +189,7 @@ public Integer timeLimitInSeconds() { } /** - * Set the timeLimitInSeconds value. + * Set maximum duration of the capture session in seconds. * * @param timeLimitInSeconds the timeLimitInSeconds value to set * @return the PacketCaptureResultInner object itself. @@ -240,7 +240,7 @@ public PacketCaptureResultInner withFilters(List filters) { } /** - * Get the provisioningState value. + * Get the provisioning state of the packet capture session. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. * * @return the provisioningState value */ @@ -249,7 +249,7 @@ public ProvisioningState provisioningState() { } /** - * Set the provisioningState value. + * Set the provisioning state of the packet capture session. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. * * @param provisioningState the provisioningState value to set * @return the PacketCaptureResultInner object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PacketCapturesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PacketCapturesInner.java index 7d1a097ffa6..8828f7e682d 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PacketCapturesInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PacketCapturesInner.java @@ -176,7 +176,7 @@ public Observable> createWithServiceRe throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.create(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -258,7 +258,7 @@ public Observable> beginCreateWithServ throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginCreate(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -349,7 +349,7 @@ public Observable> getWithServiceRespo if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.get(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -439,7 +439,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.delete(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -512,7 +512,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -529,8 +529,8 @@ public Observable> call(Response response) { private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -603,7 +603,7 @@ public Observable> stopWithServiceResponseAsync(String res if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.stop(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -676,7 +676,7 @@ public Observable> beginStopWithServiceResponseAsync(Strin if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginStop(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -768,7 +768,7 @@ public Observable> getStatu if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.getStatus(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -842,7 +842,7 @@ public Observable> beginGet if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginGetStatus(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -927,14 +927,18 @@ public Observable>> listWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { ServiceResponse> result = listDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.response()); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PatchRouteFilterInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PatchRouteFilterInner.java index a062b75fbe7..3251f07101a 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PatchRouteFilterInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PatchRouteFilterInner.java @@ -64,7 +64,7 @@ public class PatchRouteFilterInner extends SubResource { private Map tags; /** - * Get the rules value. + * Get collection of RouteFilterRules contained within a route filter. * * @return the rules value */ @@ -73,7 +73,7 @@ public List rules() { } /** - * Set the rules value. + * Set collection of RouteFilterRules contained within a route filter. * * @param rules the rules value to set * @return the PatchRouteFilterInner object itself. @@ -84,7 +84,7 @@ public PatchRouteFilterInner withRules(List rules) { } /** - * Get the peerings value. + * Get a collection of references to express route circuit peerings. * * @return the peerings value */ @@ -93,7 +93,7 @@ public List peerings() { } /** - * Set the peerings value. + * Set a collection of references to express route circuit peerings. * * @param peerings the peerings value to set * @return the PatchRouteFilterInner object itself. @@ -104,7 +104,7 @@ public PatchRouteFilterInner withPeerings(List } /** - * Get the provisioningState value. + * Get the provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'. * * @return the provisioningState value */ @@ -113,7 +113,7 @@ public String provisioningState() { } /** - * Get the name value. + * Get the name of the resource that is unique within a resource group. This name can be used to access the resource. * * @return the name value */ @@ -122,7 +122,7 @@ public String name() { } /** - * Get the etag value. + * Get a unique read-only string that changes whenever the resource is updated. * * @return the etag value */ @@ -131,7 +131,7 @@ public String etag() { } /** - * Get the type value. + * Get resource type. * * @return the type value */ @@ -140,7 +140,7 @@ public String type() { } /** - * Get the tags value. + * Get resource tags. * * @return the tags value */ @@ -149,7 +149,7 @@ public Map tags() { } /** - * Set the tags value. + * Set resource tags. * * @param tags the tags value to set * @return the PatchRouteFilterInner object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PatchRouteFilterRuleInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PatchRouteFilterRuleInner.java index 9aa47f75cb4..1e15b1f1623 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PatchRouteFilterRuleInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PatchRouteFilterRuleInner.java @@ -10,7 +10,6 @@ import com.microsoft.azure.management.network.Access; import java.util.List; -import java.util.Map; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.SubResource; @@ -60,21 +59,17 @@ public class PatchRouteFilterRuleInner extends SubResource { @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) private String etag; - /** - * Resource tags. - */ - @JsonProperty(value = "tags") - private Map tags; - /** * Creates an instance of PatchRouteFilterRuleInner class. + * @param access the access type of the rule. Valid values are: 'Allow', 'Deny'. Possible values include: 'Allow', 'Deny'. + * @param communities the collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020']. */ public PatchRouteFilterRuleInner() { routeFilterRuleType = "Community"; } /** - * Get the access value. + * Get the access type of the rule. Valid values are: 'Allow', 'Deny'. Possible values include: 'Allow', 'Deny'. * * @return the access value */ @@ -83,7 +78,7 @@ public Access access() { } /** - * Set the access value. + * Set the access type of the rule. Valid values are: 'Allow', 'Deny'. Possible values include: 'Allow', 'Deny'. * * @param access the access value to set * @return the PatchRouteFilterRuleInner object itself. @@ -94,7 +89,7 @@ public PatchRouteFilterRuleInner withAccess(Access access) { } /** - * Get the routeFilterRuleType value. + * Get the rule type of the rule. Valid value is: 'Community'. * * @return the routeFilterRuleType value */ @@ -103,7 +98,7 @@ public String routeFilterRuleType() { } /** - * Set the routeFilterRuleType value. + * Set the rule type of the rule. Valid value is: 'Community'. * * @param routeFilterRuleType the routeFilterRuleType value to set * @return the PatchRouteFilterRuleInner object itself. @@ -114,7 +109,7 @@ public PatchRouteFilterRuleInner withRouteFilterRuleType(String routeFilterRuleT } /** - * Get the communities value. + * Get the collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020']. * * @return the communities value */ @@ -123,7 +118,7 @@ public List communities() { } /** - * Set the communities value. + * Set the collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020']. * * @param communities the communities value to set * @return the PatchRouteFilterRuleInner object itself. @@ -134,7 +129,7 @@ public PatchRouteFilterRuleInner withCommunities(List communities) { } /** - * Get the provisioningState value. + * Get the provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'. * * @return the provisioningState value */ @@ -143,7 +138,7 @@ public String provisioningState() { } /** - * Get the name value. + * Get the name of the resource that is unique within a resource group. This name can be used to access the resource. * * @return the name value */ @@ -152,7 +147,7 @@ public String name() { } /** - * Get the etag value. + * Get a unique read-only string that changes whenever the resource is updated. * * @return the etag value */ @@ -160,24 +155,4 @@ public String etag() { return this.etag; } - /** - * Get the tags value. - * - * @return the tags value - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags value. - * - * @param tags the tags value to set - * @return the PatchRouteFilterRuleInner object itself. - */ - public PatchRouteFilterRuleInner withTags(Map tags) { - this.tags = tags; - return this; - } - } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ProbeInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ProbeInner.java index 2a66eefce0a..35b029af12e 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ProbeInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ProbeInner.java @@ -90,7 +90,7 @@ public class ProbeInner extends SubResource { private String etag; /** - * Get the loadBalancingRules value. + * Get the load balancer rules that use this probe. * * @return the loadBalancingRules value */ @@ -99,7 +99,7 @@ public List loadBalancingRules() { } /** - * Get the protocol value. + * Get the protocol of the end point. Possible values are: 'Http' or 'Tcp'. If 'Tcp' is specified, a received ACK is required for the probe to be successful. If 'Http' is specified, a 200 OK response from the specifies URI is required for the probe to be successful. Possible values include: 'Http', 'Tcp'. * * @return the protocol value */ @@ -108,7 +108,7 @@ public ProbeProtocol protocol() { } /** - * Set the protocol value. + * Set the protocol of the end point. Possible values are: 'Http' or 'Tcp'. If 'Tcp' is specified, a received ACK is required for the probe to be successful. If 'Http' is specified, a 200 OK response from the specifies URI is required for the probe to be successful. Possible values include: 'Http', 'Tcp'. * * @param protocol the protocol value to set * @return the ProbeInner object itself. @@ -119,7 +119,7 @@ public ProbeInner withProtocol(ProbeProtocol protocol) { } /** - * Get the port value. + * Get the port for communicating the probe. Possible values range from 1 to 65535, inclusive. * * @return the port value */ @@ -128,7 +128,7 @@ public int port() { } /** - * Set the port value. + * Set the port for communicating the probe. Possible values range from 1 to 65535, inclusive. * * @param port the port value to set * @return the ProbeInner object itself. @@ -139,7 +139,7 @@ public ProbeInner withPort(int port) { } /** - * Get the intervalInSeconds value. + * Get the interval, in seconds, for how frequently to probe the endpoint for health status. Typically, the interval is slightly less than half the allocated timeout period (in seconds) which allows two full probes before taking the instance out of rotation. The default value is 15, the minimum value is 5. * * @return the intervalInSeconds value */ @@ -148,7 +148,7 @@ public Integer intervalInSeconds() { } /** - * Set the intervalInSeconds value. + * Set the interval, in seconds, for how frequently to probe the endpoint for health status. Typically, the interval is slightly less than half the allocated timeout period (in seconds) which allows two full probes before taking the instance out of rotation. The default value is 15, the minimum value is 5. * * @param intervalInSeconds the intervalInSeconds value to set * @return the ProbeInner object itself. @@ -159,7 +159,7 @@ public ProbeInner withIntervalInSeconds(Integer intervalInSeconds) { } /** - * Get the numberOfProbes value. + * Get the number of probes where if no response, will result in stopping further traffic from being delivered to the endpoint. This values allows endpoints to be taken out of rotation faster or slower than the typical times used in Azure. * * @return the numberOfProbes value */ @@ -168,7 +168,7 @@ public Integer numberOfProbes() { } /** - * Set the numberOfProbes value. + * Set the number of probes where if no response, will result in stopping further traffic from being delivered to the endpoint. This values allows endpoints to be taken out of rotation faster or slower than the typical times used in Azure. * * @param numberOfProbes the numberOfProbes value to set * @return the ProbeInner object itself. @@ -179,7 +179,7 @@ public ProbeInner withNumberOfProbes(Integer numberOfProbes) { } /** - * Get the requestPath value. + * Get the URI used for requesting health status from the VM. Path is required if a protocol is set to http. Otherwise, it is not allowed. There is no default value. * * @return the requestPath value */ @@ -188,7 +188,7 @@ public String requestPath() { } /** - * Set the requestPath value. + * Set the URI used for requesting health status from the VM. Path is required if a protocol is set to http. Otherwise, it is not allowed. There is no default value. * * @param requestPath the requestPath value to set * @return the ProbeInner object itself. @@ -199,7 +199,7 @@ public ProbeInner withRequestPath(String requestPath) { } /** - * Get the provisioningState value. + * Get gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. * * @return the provisioningState value */ @@ -208,7 +208,7 @@ public String provisioningState() { } /** - * Set the provisioningState value. + * Set gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. * * @param provisioningState the provisioningState value to set * @return the ProbeInner object itself. @@ -219,7 +219,7 @@ public ProbeInner withProvisioningState(String provisioningState) { } /** - * Get the name value. + * Get gets name of the resource that is unique within a resource group. This name can be used to access the resource. * * @return the name value */ @@ -228,7 +228,7 @@ public String name() { } /** - * Set the name value. + * Set gets name of the resource that is unique within a resource group. This name can be used to access the resource. * * @param name the name value to set * @return the ProbeInner object itself. @@ -239,7 +239,7 @@ public ProbeInner withName(String name) { } /** - * Get the etag value. + * Get a unique read-only string that changes whenever the resource is updated. * * @return the etag value */ @@ -248,7 +248,7 @@ public String etag() { } /** - * Set the etag value. + * Set a unique read-only string that changes whenever the resource is updated. * * @param etag the etag value to set * @return the ProbeInner object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PublicIPAddressInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PublicIPAddressInner.java index 63998471b13..fc4d138c88a 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PublicIPAddressInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PublicIPAddressInner.java @@ -13,14 +13,17 @@ import com.microsoft.azure.management.network.IPVersion; import com.microsoft.azure.management.network.PublicIPAddressDnsSettings; import java.util.List; +import com.microsoft.azure.management.network.IpTag; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; import com.microsoft.azure.Resource; /** * Public IP address resource. */ @JsonFlatten +@SkipParentValidation public class PublicIPAddressInner extends Resource { /** * The public IP address SKU. @@ -54,6 +57,12 @@ public class PublicIPAddressInner extends Resource { @JsonProperty(value = "properties.dnsSettings") private PublicIPAddressDnsSettings dnsSettings; + /** + * The list of tags associated with the public IP address. + */ + @JsonProperty(value = "properties.ipTags") + private List ipTags; + /** * The IP address associated with the public IP address resource. */ @@ -93,7 +102,13 @@ public class PublicIPAddressInner extends Resource { private List zones; /** - * Get the sku value. + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get the public IP address SKU. * * @return the sku value */ @@ -102,7 +117,7 @@ public PublicIPAddressSku sku() { } /** - * Set the sku value. + * Set the public IP address SKU. * * @param sku the sku value to set * @return the PublicIPAddressInner object itself. @@ -113,7 +128,7 @@ public PublicIPAddressInner withSku(PublicIPAddressSku sku) { } /** - * Get the publicIPAllocationMethod value. + * Get the public IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'. * * @return the publicIPAllocationMethod value */ @@ -122,7 +137,7 @@ public IPAllocationMethod publicIPAllocationMethod() { } /** - * Set the publicIPAllocationMethod value. + * Set the public IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'. * * @param publicIPAllocationMethod the publicIPAllocationMethod value to set * @return the PublicIPAddressInner object itself. @@ -133,7 +148,7 @@ public PublicIPAddressInner withPublicIPAllocationMethod(IPAllocationMethod publ } /** - * Get the publicIPAddressVersion value. + * Get the public IP address version. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'. * * @return the publicIPAddressVersion value */ @@ -142,7 +157,7 @@ public IPVersion publicIPAddressVersion() { } /** - * Set the publicIPAddressVersion value. + * Set the public IP address version. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'. * * @param publicIPAddressVersion the publicIPAddressVersion value to set * @return the PublicIPAddressInner object itself. @@ -153,7 +168,7 @@ public PublicIPAddressInner withPublicIPAddressVersion(IPVersion publicIPAddress } /** - * Get the ipConfiguration value. + * Get the IP configuration associated with the public IP address. * * @return the ipConfiguration value */ @@ -162,7 +177,7 @@ public IPConfigurationInner ipConfiguration() { } /** - * Get the dnsSettings value. + * Get the FQDN of the DNS record associated with the public IP address. * * @return the dnsSettings value */ @@ -171,7 +186,7 @@ public PublicIPAddressDnsSettings dnsSettings() { } /** - * Set the dnsSettings value. + * Set the FQDN of the DNS record associated with the public IP address. * * @param dnsSettings the dnsSettings value to set * @return the PublicIPAddressInner object itself. @@ -182,7 +197,27 @@ public PublicIPAddressInner withDnsSettings(PublicIPAddressDnsSettings dnsSettin } /** - * Get the ipAddress value. + * Get the list of tags associated with the public IP address. + * + * @return the ipTags value + */ + public List ipTags() { + return this.ipTags; + } + + /** + * Set the list of tags associated with the public IP address. + * + * @param ipTags the ipTags value to set + * @return the PublicIPAddressInner object itself. + */ + public PublicIPAddressInner withIpTags(List ipTags) { + this.ipTags = ipTags; + return this; + } + + /** + * Get the IP address associated with the public IP address resource. * * @return the ipAddress value */ @@ -191,7 +226,7 @@ public String ipAddress() { } /** - * Set the ipAddress value. + * Set the IP address associated with the public IP address resource. * * @param ipAddress the ipAddress value to set * @return the PublicIPAddressInner object itself. @@ -202,7 +237,7 @@ public PublicIPAddressInner withIpAddress(String ipAddress) { } /** - * Get the idleTimeoutInMinutes value. + * Get the idle timeout of the public IP address. * * @return the idleTimeoutInMinutes value */ @@ -211,7 +246,7 @@ public Integer idleTimeoutInMinutes() { } /** - * Set the idleTimeoutInMinutes value. + * Set the idle timeout of the public IP address. * * @param idleTimeoutInMinutes the idleTimeoutInMinutes value to set * @return the PublicIPAddressInner object itself. @@ -222,7 +257,7 @@ public PublicIPAddressInner withIdleTimeoutInMinutes(Integer idleTimeoutInMinute } /** - * Get the resourceGuid value. + * Get the resource GUID property of the public IP resource. * * @return the resourceGuid value */ @@ -231,7 +266,7 @@ public String resourceGuid() { } /** - * Set the resourceGuid value. + * Set the resource GUID property of the public IP resource. * * @param resourceGuid the resourceGuid value to set * @return the PublicIPAddressInner object itself. @@ -242,7 +277,7 @@ public PublicIPAddressInner withResourceGuid(String resourceGuid) { } /** - * Get the provisioningState value. + * Get the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. * * @return the provisioningState value */ @@ -251,7 +286,7 @@ public String provisioningState() { } /** - * Set the provisioningState value. + * Set the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. * * @param provisioningState the provisioningState value to set * @return the PublicIPAddressInner object itself. @@ -262,7 +297,7 @@ public PublicIPAddressInner withProvisioningState(String provisioningState) { } /** - * Get the etag value. + * Get a unique read-only string that changes whenever the resource is updated. * * @return the etag value */ @@ -271,7 +306,7 @@ public String etag() { } /** - * Set the etag value. + * Set a unique read-only string that changes whenever the resource is updated. * * @param etag the etag value to set * @return the PublicIPAddressInner object itself. @@ -282,7 +317,7 @@ public PublicIPAddressInner withEtag(String etag) { } /** - * Get the zones value. + * Get a list of availability zones denoting the IP allocated for the resource needs to come from. * * @return the zones value */ @@ -291,7 +326,7 @@ public List zones() { } /** - * Set the zones value. + * Set a list of availability zones denoting the IP allocated for the resource needs to come from. * * @param zones the zones value to set * @return the PublicIPAddressInner object itself. @@ -301,4 +336,24 @@ public PublicIPAddressInner withZones(List zones) { return this; } + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the PublicIPAddressInner object itself. + */ + public PublicIPAddressInner withId(String id) { + this.id = id; + return this; + } + } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PublicIPAddressesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PublicIPAddressesInner.java index 70d106b576e..2467ced6501 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PublicIPAddressesInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PublicIPAddressesInner.java @@ -16,6 +16,7 @@ import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.network.TagsObject; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -24,12 +25,14 @@ import com.microsoft.rest.Validator; import java.io.IOException; import java.util.List; +import java.util.Map; import okhttp3.ResponseBody; import retrofit2.http.Body; import retrofit2.http.GET; import retrofit2.http.Header; import retrofit2.http.Headers; import retrofit2.http.HTTP; +import retrofit2.http.PATCH; import retrofit2.http.Path; import retrofit2.http.PUT; import retrofit2.http.Query; @@ -84,6 +87,14 @@ interface PublicIPAddressesService { @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}") Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("publicIpAddressName") String publicIpAddressName, @Path("subscriptionId") String subscriptionId, @Body PublicIPAddressInner 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.network.PublicIPAddresses updateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}") + Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("publicIpAddressName") String publicIpAddressName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.PublicIPAddresses beginUpdateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}") + Observable> beginUpdateTags(@Path("resourceGroupName") String resourceGroupName, @Path("publicIpAddressName") String publicIpAddressName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.PublicIPAddresses list" }) @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/publicIPAddresses") Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -183,7 +194,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.delete(resourceGroupName, publicIpAddressName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -249,7 +260,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, publicIpAddressName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -266,9 +277,9 @@ public Observable> call(Response response) { private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -335,7 +346,7 @@ public Observable> getByResourceGroupWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; final String expand = null; return service.getByResourceGroup(resourceGroupName, publicIpAddressName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -417,7 +428,7 @@ public Observable> getByResourceGroupWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.getByResourceGroup(resourceGroupName, publicIpAddressName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -509,7 +520,7 @@ public Observable> createOrUpdateWithServi throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.createOrUpdate(resourceGroupName, publicIpAddressName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -584,7 +595,7 @@ public Observable> beginCreateOrUpdateWith throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, publicIpAddressName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -601,7 +612,321 @@ public Observable> call(Response beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates public IP address tags. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PublicIPAddressInner object if successful. + */ + public PublicIPAddressInner updateTags(String resourceGroupName, String publicIpAddressName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, publicIpAddressName).toBlocking().last().body(); + } + + /** + * Updates public IP address tags. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateTagsAsync(String resourceGroupName, String publicIpAddressName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, publicIpAddressName), serviceCallback); + } + + /** + * Updates public IP address tags. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateTagsAsync(String resourceGroupName, String publicIpAddressName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, publicIpAddressName).map(new Func1, PublicIPAddressInner>() { + @Override + public PublicIPAddressInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates public IP address tags. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String publicIpAddressName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (publicIpAddressName == null) { + throw new IllegalArgumentException("Parameter publicIpAddressName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + Observable> observable = service.updateTags(resourceGroupName, publicIpAddressName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Updates public IP address tags. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PublicIPAddressInner object if successful. + */ + public PublicIPAddressInner updateTags(String resourceGroupName, String publicIpAddressName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, publicIpAddressName, tags).toBlocking().last().body(); + } + + /** + * Updates public IP address tags. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param tags Resource tags. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateTagsAsync(String resourceGroupName, String publicIpAddressName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, publicIpAddressName, tags), serviceCallback); + } + + /** + * Updates public IP address tags. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateTagsAsync(String resourceGroupName, String publicIpAddressName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, publicIpAddressName, tags).map(new Func1, PublicIPAddressInner>() { + @Override + public PublicIPAddressInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates public IP address tags. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String publicIpAddressName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (publicIpAddressName == null) { + throw new IllegalArgumentException("Parameter publicIpAddressName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + Observable> observable = service.updateTags(resourceGroupName, publicIpAddressName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Updates public IP address tags. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PublicIPAddressInner object if successful. + */ + public PublicIPAddressInner beginUpdateTags(String resourceGroupName, String publicIpAddressName) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, publicIpAddressName).toBlocking().single().body(); + } + + /** + * Updates public IP address tags. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateTagsAsync(String resourceGroupName, String publicIpAddressName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, publicIpAddressName), serviceCallback); + } + + /** + * Updates public IP address tags. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PublicIPAddressInner object + */ + public Observable beginUpdateTagsAsync(String resourceGroupName, String publicIpAddressName) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, publicIpAddressName).map(new Func1, PublicIPAddressInner>() { + @Override + public PublicIPAddressInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates public IP address tags. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PublicIPAddressInner object + */ + public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String publicIpAddressName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (publicIpAddressName == null) { + throw new IllegalArgumentException("Parameter publicIpAddressName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.beginUpdateTags(resourceGroupName, publicIpAddressName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates public IP address tags. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PublicIPAddressInner object if successful. + */ + public PublicIPAddressInner beginUpdateTags(String resourceGroupName, String publicIpAddressName, Map tags) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, publicIpAddressName, tags).toBlocking().single().body(); + } + + /** + * Updates public IP address tags. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param tags Resource tags. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateTagsAsync(String resourceGroupName, String publicIpAddressName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, publicIpAddressName, tags), serviceCallback); + } + + /** + * Updates public IP address tags. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PublicIPAddressInner object + */ + public Observable beginUpdateTagsAsync(String resourceGroupName, String publicIpAddressName, Map tags) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, publicIpAddressName, tags).map(new Func1, PublicIPAddressInner>() { + @Override + public PublicIPAddressInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates public IP address tags. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PublicIPAddressInner object + */ + public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String publicIpAddressName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (publicIpAddressName == null) { + throw new IllegalArgumentException("Parameter publicIpAddressName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.beginUpdateTags(resourceGroupName, publicIpAddressName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateTagsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -690,7 +1015,7 @@ public Observable>> listSinglePageAsy if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -803,7 +1128,7 @@ public Observable>> listByResourceGro if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ResourceNavigationLinkInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ResourceNavigationLinkInner.java index ffccfd072cf..b704a732dc3 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ResourceNavigationLinkInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ResourceNavigationLinkInner.java @@ -49,7 +49,7 @@ public class ResourceNavigationLinkInner extends SubResource { private String etag; /** - * Get the linkedResourceType value. + * Get resource type of the linked resource. * * @return the linkedResourceType value */ @@ -58,7 +58,7 @@ public String linkedResourceType() { } /** - * Set the linkedResourceType value. + * Set resource type of the linked resource. * * @param linkedResourceType the linkedResourceType value to set * @return the ResourceNavigationLinkInner object itself. @@ -69,7 +69,7 @@ public ResourceNavigationLinkInner withLinkedResourceType(String linkedResourceT } /** - * Get the link value. + * Get link to the external resource. * * @return the link value */ @@ -78,7 +78,7 @@ public String link() { } /** - * Set the link value. + * Set link to the external resource. * * @param link the link value to set * @return the ResourceNavigationLinkInner object itself. @@ -89,7 +89,7 @@ public ResourceNavigationLinkInner withLink(String link) { } /** - * Get the provisioningState value. + * Get provisioning state of the ResourceNavigationLink resource. * * @return the provisioningState value */ @@ -98,7 +98,7 @@ public String provisioningState() { } /** - * Get the name value. + * Get name of the resource that is unique within a resource group. This name can be used to access the resource. * * @return the name value */ @@ -107,7 +107,7 @@ public String name() { } /** - * Set the name value. + * Set name of the resource that is unique within a resource group. This name can be used to access the resource. * * @param name the name value to set * @return the ResourceNavigationLinkInner object itself. @@ -118,7 +118,7 @@ public ResourceNavigationLinkInner withName(String name) { } /** - * Get the etag value. + * Get a unique read-only string that changes whenever the resource is updated. * * @return the etag value */ diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteFilterInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteFilterInner.java index 6f66d957d8f..e53a2f5158a 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteFilterInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteFilterInner.java @@ -11,12 +11,14 @@ import java.util.List; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; import com.microsoft.azure.Resource; /** * Route Filter Resource. */ @JsonFlatten +@SkipParentValidation public class RouteFilterInner extends Resource { /** * Collection of RouteFilterRules contained within a route filter. @@ -45,7 +47,13 @@ public class RouteFilterInner extends Resource { private String etag; /** - * Get the rules value. + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get collection of RouteFilterRules contained within a route filter. * * @return the rules value */ @@ -54,7 +62,7 @@ public List rules() { } /** - * Set the rules value. + * Set collection of RouteFilterRules contained within a route filter. * * @param rules the rules value to set * @return the RouteFilterInner object itself. @@ -65,7 +73,7 @@ public RouteFilterInner withRules(List rules) { } /** - * Get the peerings value. + * Get a collection of references to express route circuit peerings. * * @return the peerings value */ @@ -74,7 +82,7 @@ public List peerings() { } /** - * Set the peerings value. + * Set a collection of references to express route circuit peerings. * * @param peerings the peerings value to set * @return the RouteFilterInner object itself. @@ -85,7 +93,7 @@ public RouteFilterInner withPeerings(List peeri } /** - * Get the provisioningState value. + * Get the provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'. * * @return the provisioningState value */ @@ -94,7 +102,7 @@ public String provisioningState() { } /** - * Get the etag value. + * Get gets a unique read-only string that changes whenever the resource is updated. * * @return the etag value */ @@ -102,4 +110,24 @@ public String etag() { return this.etag; } + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the RouteFilterInner object itself. + */ + public RouteFilterInner withId(String id) { + this.id = id; + return this; + } + } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteFilterRuleInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteFilterRuleInner.java index 11462b43196..9cff55e910e 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteFilterRuleInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteFilterRuleInner.java @@ -10,7 +10,6 @@ import com.microsoft.azure.management.network.Access; import java.util.List; -import java.util.Map; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.SubResource; @@ -66,21 +65,17 @@ public class RouteFilterRuleInner extends SubResource { @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) private String etag; - /** - * Resource tags. - */ - @JsonProperty(value = "tags") - private Map tags; - /** * Creates an instance of RouteFilterRuleInner class. + * @param access the access type of the rule. Valid values are: 'Allow', 'Deny'. Possible values include: 'Allow', 'Deny'. + * @param communities the collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020']. */ public RouteFilterRuleInner() { routeFilterRuleType = "Community"; } /** - * Get the access value. + * Get the access type of the rule. Valid values are: 'Allow', 'Deny'. Possible values include: 'Allow', 'Deny'. * * @return the access value */ @@ -89,7 +84,7 @@ public Access access() { } /** - * Set the access value. + * Set the access type of the rule. Valid values are: 'Allow', 'Deny'. Possible values include: 'Allow', 'Deny'. * * @param access the access value to set * @return the RouteFilterRuleInner object itself. @@ -100,7 +95,7 @@ public RouteFilterRuleInner withAccess(Access access) { } /** - * Get the routeFilterRuleType value. + * Get the rule type of the rule. Valid value is: 'Community'. * * @return the routeFilterRuleType value */ @@ -109,7 +104,7 @@ public String routeFilterRuleType() { } /** - * Set the routeFilterRuleType value. + * Set the rule type of the rule. Valid value is: 'Community'. * * @param routeFilterRuleType the routeFilterRuleType value to set * @return the RouteFilterRuleInner object itself. @@ -120,7 +115,7 @@ public RouteFilterRuleInner withRouteFilterRuleType(String routeFilterRuleType) } /** - * Get the communities value. + * Get the collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020']. * * @return the communities value */ @@ -129,7 +124,7 @@ public List communities() { } /** - * Set the communities value. + * Set the collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020']. * * @param communities the communities value to set * @return the RouteFilterRuleInner object itself. @@ -140,7 +135,7 @@ public RouteFilterRuleInner withCommunities(List communities) { } /** - * Get the provisioningState value. + * Get the provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'. * * @return the provisioningState value */ @@ -149,7 +144,7 @@ public String provisioningState() { } /** - * Get the name value. + * Get the name of the resource that is unique within a resource group. This name can be used to access the resource. * * @return the name value */ @@ -158,7 +153,7 @@ public String name() { } /** - * Set the name value. + * Set the name of the resource that is unique within a resource group. This name can be used to access the resource. * * @param name the name value to set * @return the RouteFilterRuleInner object itself. @@ -169,7 +164,7 @@ public RouteFilterRuleInner withName(String name) { } /** - * Get the location value. + * Get resource location. * * @return the location value */ @@ -178,7 +173,7 @@ public String location() { } /** - * Set the location value. + * Set resource location. * * @param location the location value to set * @return the RouteFilterRuleInner object itself. @@ -189,7 +184,7 @@ public RouteFilterRuleInner withLocation(String location) { } /** - * Get the etag value. + * Get a unique read-only string that changes whenever the resource is updated. * * @return the etag value */ @@ -197,24 +192,4 @@ public String etag() { return this.etag; } - /** - * Get the tags value. - * - * @return the tags value - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags value. - * - * @param tags the tags value to set - * @return the RouteFilterRuleInner object itself. - */ - public RouteFilterRuleInner withTags(Map tags) { - this.tags = tags; - return this; - } - } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteFilterRulesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteFilterRulesInner.java index 9d0b9cca7eb..2e63126c8f7 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteFilterRulesInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteFilterRulesInner.java @@ -168,7 +168,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.delete(resourceGroupName, routeFilterName, ruleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -241,7 +241,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, routeFilterName, ruleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -258,8 +258,8 @@ public Observable> call(Response response) { private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(202, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -334,7 +334,7 @@ public Observable> getWithServiceResponseA if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.get(resourceGroupName, routeFilterName, ruleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -433,7 +433,7 @@ public Observable> createOrUpdateWithServi throw new IllegalArgumentException("Parameter routeFilterRuleParameters is required and cannot be null."); } Validator.validate(routeFilterRuleParameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.createOrUpdate(resourceGroupName, routeFilterName, ruleName, this.client.subscriptionId(), routeFilterRuleParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -515,7 +515,7 @@ public Observable> beginCreateOrUpdateWith throw new IllegalArgumentException("Parameter routeFilterRuleParameters is required and cannot be null."); } Validator.validate(routeFilterRuleParameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, routeFilterName, ruleName, this.client.subscriptionId(), routeFilterRuleParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -615,7 +615,7 @@ public Observable> updateWithServiceRespon throw new IllegalArgumentException("Parameter routeFilterRuleParameters is required and cannot be null."); } Validator.validate(routeFilterRuleParameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.update(resourceGroupName, routeFilterName, ruleName, this.client.subscriptionId(), routeFilterRuleParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -697,7 +697,7 @@ public Observable> beginUpdateWithServiceR throw new IllegalArgumentException("Parameter routeFilterRuleParameters is required and cannot be null."); } Validator.validate(routeFilterRuleParameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginUpdate(resourceGroupName, routeFilterName, ruleName, this.client.subscriptionId(), routeFilterRuleParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -818,7 +818,7 @@ public Observable>> listByRouteFilter if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.listByRouteFilter(resourceGroupName, routeFilterName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteFiltersInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteFiltersInner.java index a7126188547..f461ef0aa1d 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteFiltersInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteFiltersInner.java @@ -172,7 +172,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.delete(resourceGroupName, routeFilterName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -238,7 +238,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, routeFilterName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -255,8 +255,8 @@ public Observable> call(Response response) { private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(202, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -324,7 +324,7 @@ public Observable> getByResourceGroupWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; final String expand = null; return service.getByResourceGroup(resourceGroupName, routeFilterName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -406,7 +406,7 @@ public Observable> getByResourceGroupWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.getByResourceGroup(resourceGroupName, routeFilterName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -498,7 +498,7 @@ public Observable> createOrUpdateWithServiceRe throw new IllegalArgumentException("Parameter routeFilterParameters is required and cannot be null."); } Validator.validate(routeFilterParameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.createOrUpdate(resourceGroupName, routeFilterName, this.client.subscriptionId(), routeFilterParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -573,7 +573,7 @@ public Observable> beginCreateOrUpdateWithServ throw new IllegalArgumentException("Parameter routeFilterParameters is required and cannot be null."); } Validator.validate(routeFilterParameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, routeFilterName, this.client.subscriptionId(), routeFilterParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -666,7 +666,7 @@ public Observable> updateWithServiceResponseAs throw new IllegalArgumentException("Parameter routeFilterParameters is required and cannot be null."); } Validator.validate(routeFilterParameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.update(resourceGroupName, routeFilterName, this.client.subscriptionId(), routeFilterParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -741,7 +741,7 @@ public Observable> beginUpdateWithServiceRespo throw new IllegalArgumentException("Parameter routeFilterParameters is required and cannot be null."); } Validator.validate(routeFilterParameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginUpdate(resourceGroupName, routeFilterName, this.client.subscriptionId(), routeFilterParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -854,7 +854,7 @@ public Observable>> listByResourceGroupSi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -959,7 +959,7 @@ public Observable>> listSinglePageAsync() if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteInner.java index d83cea616f2..7706f25c7c4 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteInner.java @@ -61,7 +61,7 @@ public class RouteInner extends SubResource { private String etag; /** - * Get the addressPrefix value. + * Get the destination CIDR to which the route applies. * * @return the addressPrefix value */ @@ -70,7 +70,7 @@ public String addressPrefix() { } /** - * Set the addressPrefix value. + * Set the destination CIDR to which the route applies. * * @param addressPrefix the addressPrefix value to set * @return the RouteInner object itself. @@ -81,7 +81,7 @@ public RouteInner withAddressPrefix(String addressPrefix) { } /** - * Get the nextHopType value. + * Get the type of Azure hop the packet should be sent to. Possible values are: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'. Possible values include: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', 'None'. * * @return the nextHopType value */ @@ -90,7 +90,7 @@ public RouteNextHopType nextHopType() { } /** - * Set the nextHopType value. + * Set the type of Azure hop the packet should be sent to. Possible values are: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'. Possible values include: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', 'None'. * * @param nextHopType the nextHopType value to set * @return the RouteInner object itself. @@ -101,7 +101,7 @@ public RouteInner withNextHopType(RouteNextHopType nextHopType) { } /** - * Get the nextHopIpAddress value. + * Get the IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance. * * @return the nextHopIpAddress value */ @@ -110,7 +110,7 @@ public String nextHopIpAddress() { } /** - * Set the nextHopIpAddress value. + * Set the IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance. * * @param nextHopIpAddress the nextHopIpAddress value to set * @return the RouteInner object itself. @@ -121,7 +121,7 @@ public RouteInner withNextHopIpAddress(String nextHopIpAddress) { } /** - * Get the provisioningState value. + * Get the provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. * * @return the provisioningState value */ @@ -130,7 +130,7 @@ public String provisioningState() { } /** - * Set the provisioningState value. + * Set the provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. * * @param provisioningState the provisioningState value to set * @return the RouteInner object itself. @@ -141,7 +141,7 @@ public RouteInner withProvisioningState(String provisioningState) { } /** - * Get the name value. + * Get the name of the resource that is unique within a resource group. This name can be used to access the resource. * * @return the name value */ @@ -150,7 +150,7 @@ public String name() { } /** - * Set the name value. + * Set the name of the resource that is unique within a resource group. This name can be used to access the resource. * * @param name the name value to set * @return the RouteInner object itself. @@ -161,7 +161,7 @@ public RouteInner withName(String name) { } /** - * Get the etag value. + * Get a unique read-only string that changes whenever the resource is updated. * * @return the etag value */ @@ -170,7 +170,7 @@ public String etag() { } /** - * Set the etag value. + * Set a unique read-only string that changes whenever the resource is updated. * * @param etag the etag value to set * @return the RouteInner object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteTableInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteTableInner.java index edcf27934d4..932fdbee2da 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteTableInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteTableInner.java @@ -11,12 +11,14 @@ import java.util.List; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; import com.microsoft.azure.Resource; /** * Route table resource. */ @JsonFlatten +@SkipParentValidation public class RouteTableInner extends Resource { /** * Collection of routes contained within a route table. @@ -30,6 +32,13 @@ public class RouteTableInner extends Resource { @JsonProperty(value = "properties.subnets", access = JsonProperty.Access.WRITE_ONLY) private List subnets; + /** + * Gets or sets whether to disable the routes learned by BGP on that route + * table. True means disable. + */ + @JsonProperty(value = "properties.disableBgpRoutePropagation") + private Boolean disableBgpRoutePropagation; + /** * The provisioning state of the resource. Possible values are: 'Updating', * 'Deleting', and 'Failed'. @@ -45,7 +54,13 @@ public class RouteTableInner extends Resource { private String etag; /** - * Get the routes value. + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get collection of routes contained within a route table. * * @return the routes value */ @@ -54,7 +69,7 @@ public List routes() { } /** - * Set the routes value. + * Set collection of routes contained within a route table. * * @param routes the routes value to set * @return the RouteTableInner object itself. @@ -65,7 +80,7 @@ public RouteTableInner withRoutes(List routes) { } /** - * Get the subnets value. + * Get a collection of references to subnets. * * @return the subnets value */ @@ -74,7 +89,27 @@ public List subnets() { } /** - * Get the provisioningState value. + * Get gets or sets whether to disable the routes learned by BGP on that route table. True means disable. + * + * @return the disableBgpRoutePropagation value + */ + public Boolean disableBgpRoutePropagation() { + return this.disableBgpRoutePropagation; + } + + /** + * Set gets or sets whether to disable the routes learned by BGP on that route table. True means disable. + * + * @param disableBgpRoutePropagation the disableBgpRoutePropagation value to set + * @return the RouteTableInner object itself. + */ + public RouteTableInner withDisableBgpRoutePropagation(Boolean disableBgpRoutePropagation) { + this.disableBgpRoutePropagation = disableBgpRoutePropagation; + return this; + } + + /** + * Get the provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. * * @return the provisioningState value */ @@ -83,7 +118,7 @@ public String provisioningState() { } /** - * Set the provisioningState value. + * Set the provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. * * @param provisioningState the provisioningState value to set * @return the RouteTableInner object itself. @@ -94,7 +129,7 @@ public RouteTableInner withProvisioningState(String provisioningState) { } /** - * Get the etag value. + * Get gets a unique read-only string that changes whenever the resource is updated. * * @return the etag value */ @@ -103,7 +138,7 @@ public String etag() { } /** - * Set the etag value. + * Set gets a unique read-only string that changes whenever the resource is updated. * * @param etag the etag value to set * @return the RouteTableInner object itself. @@ -113,4 +148,24 @@ public RouteTableInner withEtag(String etag) { return this; } + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the RouteTableInner object itself. + */ + public RouteTableInner withId(String id) { + this.id = id; + return this; + } + } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteTablesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteTablesInner.java index 284f9342bba..af7be12a4f4 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteTablesInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteTablesInner.java @@ -16,6 +16,7 @@ import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.network.TagsObject; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -24,12 +25,14 @@ import com.microsoft.rest.Validator; import java.io.IOException; import java.util.List; +import java.util.Map; import okhttp3.ResponseBody; import retrofit2.http.Body; import retrofit2.http.GET; import retrofit2.http.Header; import retrofit2.http.Headers; import retrofit2.http.HTTP; +import retrofit2.http.PATCH; import retrofit2.http.Path; import retrofit2.http.PUT; import retrofit2.http.Query; @@ -84,6 +87,14 @@ interface RouteTablesService { @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}") Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("routeTableName") String routeTableName, @Path("subscriptionId") String subscriptionId, @Body RouteTableInner 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.network.RouteTables updateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}") + Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("routeTableName") String routeTableName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.RouteTables beginUpdateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}") + Observable> beginUpdateTags(@Path("resourceGroupName") String resourceGroupName, @Path("routeTableName") String routeTableName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.RouteTables listByResourceGroup" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables") Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -163,7 +174,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.delete(resourceGroupName, routeTableName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -229,7 +240,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, routeTableName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -246,9 +257,9 @@ public Observable> call(Response response) { private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -315,7 +326,7 @@ public Observable> getByResourceGroupWithServic if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; final String expand = null; return service.getByResourceGroup(resourceGroupName, routeTableName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -397,7 +408,7 @@ public Observable> getByResourceGroupWithServic if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.getByResourceGroup(resourceGroupName, routeTableName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -489,7 +500,7 @@ public Observable> createOrUpdateWithServiceRes throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.createOrUpdate(resourceGroupName, routeTableName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -564,7 +575,7 @@ public Observable> beginCreateOrUpdateWithServi throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, routeTableName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -587,6 +598,320 @@ private ServiceResponse beginCreateOrUpdateDelegate(Response updateTagsAsync(String resourceGroupName, String routeTableName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, routeTableName), serviceCallback); + } + + /** + * Updates a route table tags. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateTagsAsync(String resourceGroupName, String routeTableName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, routeTableName).map(new Func1, RouteTableInner>() { + @Override + public RouteTableInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a route table tags. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String routeTableName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (routeTableName == null) { + throw new IllegalArgumentException("Parameter routeTableName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + Observable> observable = service.updateTags(resourceGroupName, routeTableName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Updates a route table tags. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RouteTableInner object if successful. + */ + public RouteTableInner updateTags(String resourceGroupName, String routeTableName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, routeTableName, tags).toBlocking().last().body(); + } + + /** + * Updates a route table tags. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param tags Resource tags. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateTagsAsync(String resourceGroupName, String routeTableName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, routeTableName, tags), serviceCallback); + } + + /** + * Updates a route table tags. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateTagsAsync(String resourceGroupName, String routeTableName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, routeTableName, tags).map(new Func1, RouteTableInner>() { + @Override + public RouteTableInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a route table tags. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String routeTableName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (routeTableName == null) { + throw new IllegalArgumentException("Parameter routeTableName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + Observable> observable = service.updateTags(resourceGroupName, routeTableName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Updates a route table tags. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RouteTableInner object if successful. + */ + public RouteTableInner beginUpdateTags(String resourceGroupName, String routeTableName) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, routeTableName).toBlocking().single().body(); + } + + /** + * Updates a route table tags. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateTagsAsync(String resourceGroupName, String routeTableName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, routeTableName), serviceCallback); + } + + /** + * Updates a route table tags. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RouteTableInner object + */ + public Observable beginUpdateTagsAsync(String resourceGroupName, String routeTableName) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, routeTableName).map(new Func1, RouteTableInner>() { + @Override + public RouteTableInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a route table tags. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RouteTableInner object + */ + public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String routeTableName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (routeTableName == null) { + throw new IllegalArgumentException("Parameter routeTableName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.beginUpdateTags(resourceGroupName, routeTableName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates a route table tags. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RouteTableInner object if successful. + */ + public RouteTableInner beginUpdateTags(String resourceGroupName, String routeTableName, Map tags) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, routeTableName, tags).toBlocking().single().body(); + } + + /** + * Updates a route table tags. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param tags Resource tags. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateTagsAsync(String resourceGroupName, String routeTableName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, routeTableName, tags), serviceCallback); + } + + /** + * Updates a route table tags. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RouteTableInner object + */ + public Observable beginUpdateTagsAsync(String resourceGroupName, String routeTableName, Map tags) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, routeTableName, tags).map(new Func1, RouteTableInner>() { + @Override + public RouteTableInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a route table tags. + * + * @param resourceGroupName The name of the resource group. + * @param routeTableName The name of the route table. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RouteTableInner object + */ + public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String routeTableName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (routeTableName == null) { + throw new IllegalArgumentException("Parameter routeTableName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.beginUpdateTags(resourceGroupName, routeTableName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateTagsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** * Gets all route tables in a resource group. * @@ -678,7 +1003,7 @@ public Observable>> listByResourceGroupSin if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -783,7 +1108,7 @@ public Observable>> listSinglePageAsync() if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RoutesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RoutesInner.java index be1e3925887..e6053d994b2 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RoutesInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RoutesInner.java @@ -159,7 +159,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.delete(resourceGroupName, routeTableName, routeName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -232,7 +232,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, routeTableName, routeName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -249,8 +249,8 @@ public Observable> call(Response response) { private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(202, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -325,7 +325,7 @@ public Observable> getWithServiceResponseAsync(Strin if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.get(resourceGroupName, routeTableName, routeName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -424,7 +424,7 @@ public Observable> createOrUpdateWithServiceResponse throw new IllegalArgumentException("Parameter routeParameters is required and cannot be null."); } Validator.validate(routeParameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.createOrUpdate(resourceGroupName, routeTableName, routeName, this.client.subscriptionId(), routeParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -506,7 +506,7 @@ public Observable> beginCreateOrUpdateWithServiceRes throw new IllegalArgumentException("Parameter routeParameters is required and cannot be null."); } Validator.validate(routeParameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, routeTableName, routeName, this.client.subscriptionId(), routeParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -628,7 +628,7 @@ public Observable>> listSinglePageAsync(final S if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(resourceGroupName, routeTableName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SecurityGroupViewResultInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SecurityGroupViewResultInner.java index 98a9e007e93..80a908814b6 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SecurityGroupViewResultInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SecurityGroupViewResultInner.java @@ -23,7 +23,7 @@ public class SecurityGroupViewResultInner { private List networkInterfaces; /** - * Get the networkInterfaces value. + * Get list of network interfaces on the specified VM. * * @return the networkInterfaces value */ @@ -32,7 +32,7 @@ public List networkInterfaces() { } /** - * Set the networkInterfaces value. + * Set list of network interfaces on the specified VM. * * @param networkInterfaces the networkInterfaces value to set * @return the SecurityGroupViewResultInner object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SecurityRuleInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SecurityRuleInner.java index a155a249c76..6ae4006d52b 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SecurityRuleInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SecurityRuleInner.java @@ -54,7 +54,7 @@ public class SecurityRuleInner extends SubResource { * and 'Internet' can also be used. If this is an ingress rule, specifies * where network traffic originates from. */ - @JsonProperty(value = "properties.sourceAddressPrefix", required = true) + @JsonProperty(value = "properties.sourceAddressPrefix") private String sourceAddressPrefix; /** @@ -63,12 +63,18 @@ public class SecurityRuleInner extends SubResource { @JsonProperty(value = "properties.sourceAddressPrefixes") private List sourceAddressPrefixes; + /** + * The application security group specified as source. + */ + @JsonProperty(value = "properties.sourceApplicationSecurityGroups") + private List sourceApplicationSecurityGroups; + /** * The destination address prefix. CIDR or destination IP range. Asterix * '*' can also be used to match all source IPs. Default tags such as * 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. */ - @JsonProperty(value = "properties.destinationAddressPrefix", required = true) + @JsonProperty(value = "properties.destinationAddressPrefix") private String destinationAddressPrefix; /** @@ -77,6 +83,12 @@ public class SecurityRuleInner extends SubResource { @JsonProperty(value = "properties.destinationAddressPrefixes") private List destinationAddressPrefixes; + /** + * The application security group specified as destination. + */ + @JsonProperty(value = "properties.destinationApplicationSecurityGroups") + private List destinationApplicationSecurityGroups; + /** * The source port ranges. */ @@ -134,7 +146,7 @@ public class SecurityRuleInner extends SubResource { private String etag; /** - * Get the description value. + * Get a description for this rule. Restricted to 140 chars. * * @return the description value */ @@ -143,7 +155,7 @@ public String description() { } /** - * Set the description value. + * Set a description for this rule. Restricted to 140 chars. * * @param description the description value to set * @return the SecurityRuleInner object itself. @@ -154,7 +166,7 @@ public SecurityRuleInner withDescription(String description) { } /** - * Get the protocol value. + * Get network protocol this rule applies to. Possible values are 'Tcp', 'Udp', and '*'. Possible values include: 'Tcp', 'Udp', '*'. * * @return the protocol value */ @@ -163,7 +175,7 @@ public SecurityRuleProtocol protocol() { } /** - * Set the protocol value. + * Set network protocol this rule applies to. Possible values are 'Tcp', 'Udp', and '*'. Possible values include: 'Tcp', 'Udp', '*'. * * @param protocol the protocol value to set * @return the SecurityRuleInner object itself. @@ -174,7 +186,7 @@ public SecurityRuleInner withProtocol(SecurityRuleProtocol protocol) { } /** - * Get the sourcePortRange value. + * Get the source port or range. Integer or range between 0 and 65535. Asterix '*' can also be used to match all ports. * * @return the sourcePortRange value */ @@ -183,7 +195,7 @@ public String sourcePortRange() { } /** - * Set the sourcePortRange value. + * Set the source port or range. Integer or range between 0 and 65535. Asterix '*' can also be used to match all ports. * * @param sourcePortRange the sourcePortRange value to set * @return the SecurityRuleInner object itself. @@ -194,7 +206,7 @@ public SecurityRuleInner withSourcePortRange(String sourcePortRange) { } /** - * Get the destinationPortRange value. + * Get the destination port or range. Integer or range between 0 and 65535. Asterix '*' can also be used to match all ports. * * @return the destinationPortRange value */ @@ -203,7 +215,7 @@ public String destinationPortRange() { } /** - * Set the destinationPortRange value. + * Set the destination port or range. Integer or range between 0 and 65535. Asterix '*' can also be used to match all ports. * * @param destinationPortRange the destinationPortRange value to set * @return the SecurityRuleInner object itself. @@ -214,7 +226,7 @@ public SecurityRuleInner withDestinationPortRange(String destinationPortRange) { } /** - * Get the sourceAddressPrefix value. + * Get the CIDR or source IP range. Asterix '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from. * * @return the sourceAddressPrefix value */ @@ -223,7 +235,7 @@ public String sourceAddressPrefix() { } /** - * Set the sourceAddressPrefix value. + * Set the CIDR or source IP range. Asterix '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from. * * @param sourceAddressPrefix the sourceAddressPrefix value to set * @return the SecurityRuleInner object itself. @@ -234,7 +246,7 @@ public SecurityRuleInner withSourceAddressPrefix(String sourceAddressPrefix) { } /** - * Get the sourceAddressPrefixes value. + * Get the CIDR or source IP ranges. * * @return the sourceAddressPrefixes value */ @@ -243,7 +255,7 @@ public List sourceAddressPrefixes() { } /** - * Set the sourceAddressPrefixes value. + * Set the CIDR or source IP ranges. * * @param sourceAddressPrefixes the sourceAddressPrefixes value to set * @return the SecurityRuleInner object itself. @@ -254,7 +266,27 @@ public SecurityRuleInner withSourceAddressPrefixes(List sourceAddressPre } /** - * Get the destinationAddressPrefix value. + * Get the application security group specified as source. + * + * @return the sourceApplicationSecurityGroups value + */ + public List sourceApplicationSecurityGroups() { + return this.sourceApplicationSecurityGroups; + } + + /** + * Set the application security group specified as source. + * + * @param sourceApplicationSecurityGroups the sourceApplicationSecurityGroups value to set + * @return the SecurityRuleInner object itself. + */ + public SecurityRuleInner withSourceApplicationSecurityGroups(List sourceApplicationSecurityGroups) { + this.sourceApplicationSecurityGroups = sourceApplicationSecurityGroups; + return this; + } + + /** + * Get the destination address prefix. CIDR or destination IP range. Asterix '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. * * @return the destinationAddressPrefix value */ @@ -263,7 +295,7 @@ public String destinationAddressPrefix() { } /** - * Set the destinationAddressPrefix value. + * Set the destination address prefix. CIDR or destination IP range. Asterix '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. * * @param destinationAddressPrefix the destinationAddressPrefix value to set * @return the SecurityRuleInner object itself. @@ -274,7 +306,7 @@ public SecurityRuleInner withDestinationAddressPrefix(String destinationAddressP } /** - * Get the destinationAddressPrefixes value. + * Get the destination address prefixes. CIDR or destination IP ranges. * * @return the destinationAddressPrefixes value */ @@ -283,7 +315,7 @@ public List destinationAddressPrefixes() { } /** - * Set the destinationAddressPrefixes value. + * Set the destination address prefixes. CIDR or destination IP ranges. * * @param destinationAddressPrefixes the destinationAddressPrefixes value to set * @return the SecurityRuleInner object itself. @@ -294,7 +326,27 @@ public SecurityRuleInner withDestinationAddressPrefixes(List destination } /** - * Get the sourcePortRanges value. + * Get the application security group specified as destination. + * + * @return the destinationApplicationSecurityGroups value + */ + public List destinationApplicationSecurityGroups() { + return this.destinationApplicationSecurityGroups; + } + + /** + * Set the application security group specified as destination. + * + * @param destinationApplicationSecurityGroups the destinationApplicationSecurityGroups value to set + * @return the SecurityRuleInner object itself. + */ + public SecurityRuleInner withDestinationApplicationSecurityGroups(List destinationApplicationSecurityGroups) { + this.destinationApplicationSecurityGroups = destinationApplicationSecurityGroups; + return this; + } + + /** + * Get the source port ranges. * * @return the sourcePortRanges value */ @@ -303,7 +355,7 @@ public List sourcePortRanges() { } /** - * Set the sourcePortRanges value. + * Set the source port ranges. * * @param sourcePortRanges the sourcePortRanges value to set * @return the SecurityRuleInner object itself. @@ -314,7 +366,7 @@ public SecurityRuleInner withSourcePortRanges(List sourcePortRanges) { } /** - * Get the destinationPortRanges value. + * Get the destination port ranges. * * @return the destinationPortRanges value */ @@ -323,7 +375,7 @@ public List destinationPortRanges() { } /** - * Set the destinationPortRanges value. + * Set the destination port ranges. * * @param destinationPortRanges the destinationPortRanges value to set * @return the SecurityRuleInner object itself. @@ -334,7 +386,7 @@ public SecurityRuleInner withDestinationPortRanges(List destinationPortR } /** - * Get the access value. + * Get the network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'Allow', 'Deny'. * * @return the access value */ @@ -343,7 +395,7 @@ public SecurityRuleAccess access() { } /** - * Set the access value. + * Set the network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'Allow', 'Deny'. * * @param access the access value to set * @return the SecurityRuleInner object itself. @@ -354,7 +406,7 @@ public SecurityRuleInner withAccess(SecurityRuleAccess access) { } /** - * Get the priority value. + * Get the priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. * * @return the priority value */ @@ -363,7 +415,7 @@ public Integer priority() { } /** - * Set the priority value. + * Set the priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. * * @param priority the priority value to set * @return the SecurityRuleInner object itself. @@ -374,7 +426,7 @@ public SecurityRuleInner withPriority(Integer priority) { } /** - * Get the direction value. + * Get the direction of the rule. The direction specifies if rule will be evaluated on incoming or outcoming traffic. Possible values are: 'Inbound' and 'Outbound'. Possible values include: 'Inbound', 'Outbound'. * * @return the direction value */ @@ -383,7 +435,7 @@ public SecurityRuleDirection direction() { } /** - * Set the direction value. + * Set the direction of the rule. The direction specifies if rule will be evaluated on incoming or outcoming traffic. Possible values are: 'Inbound' and 'Outbound'. Possible values include: 'Inbound', 'Outbound'. * * @param direction the direction value to set * @return the SecurityRuleInner object itself. @@ -394,7 +446,7 @@ public SecurityRuleInner withDirection(SecurityRuleDirection direction) { } /** - * Get the provisioningState value. + * Get the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. * * @return the provisioningState value */ @@ -403,7 +455,7 @@ public String provisioningState() { } /** - * Set the provisioningState value. + * Set the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. * * @param provisioningState the provisioningState value to set * @return the SecurityRuleInner object itself. @@ -414,7 +466,7 @@ public SecurityRuleInner withProvisioningState(String provisioningState) { } /** - * Get the name value. + * Get the name of the resource that is unique within a resource group. This name can be used to access the resource. * * @return the name value */ @@ -423,7 +475,7 @@ public String name() { } /** - * Set the name value. + * Set the name of the resource that is unique within a resource group. This name can be used to access the resource. * * @param name the name value to set * @return the SecurityRuleInner object itself. @@ -434,7 +486,7 @@ public SecurityRuleInner withName(String name) { } /** - * Get the etag value. + * Get a unique read-only string that changes whenever the resource is updated. * * @return the etag value */ @@ -443,7 +495,7 @@ public String etag() { } /** - * Set the etag value. + * Set a unique read-only string that changes whenever the resource is updated. * * @param etag the etag value to set * @return the SecurityRuleInner object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SecurityRulesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SecurityRulesInner.java index 331b11e47a6..4ec2c9ea04a 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SecurityRulesInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SecurityRulesInner.java @@ -159,7 +159,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.delete(resourceGroupName, networkSecurityGroupName, securityRuleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -232,7 +232,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, networkSecurityGroupName, securityRuleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -249,9 +249,9 @@ public Observable> call(Response response) { private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -325,7 +325,7 @@ public Observable> getWithServiceResponseAsyn if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.get(resourceGroupName, networkSecurityGroupName, securityRuleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -424,7 +424,7 @@ public Observable> createOrUpdateWithServiceR throw new IllegalArgumentException("Parameter securityRuleParameters is required and cannot be null."); } Validator.validate(securityRuleParameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.createOrUpdate(resourceGroupName, networkSecurityGroupName, securityRuleName, this.client.subscriptionId(), securityRuleParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -506,7 +506,7 @@ public Observable> beginCreateOrUpdateWithSer throw new IllegalArgumentException("Parameter securityRuleParameters is required and cannot be null."); } Validator.validate(securityRuleParameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, networkSecurityGroupName, securityRuleName, this.client.subscriptionId(), securityRuleParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -628,7 +628,7 @@ public Observable>> listSinglePageAsync( if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SubnetInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SubnetInner.java index 9aa6c3f052d..14479c3dc8b 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SubnetInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SubnetInner.java @@ -9,8 +9,8 @@ package com.microsoft.azure.management.network.implementation; import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.azure.management.network.ServiceEndpointPropertiesFormat; +import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.SubResource; @@ -29,13 +29,13 @@ public class SubnetInner extends SubResource { * The reference of the NetworkSecurityGroup resource. */ @JsonProperty(value = "properties.networkSecurityGroup") - private SubResource networkSecurityGroup; + private NetworkSecurityGroupInner networkSecurityGroup; /** * The reference of the RouteTable resource. */ @JsonProperty(value = "properties.routeTable") - private SubResource routeTable; + private RouteTableInner routeTable; /** * An array of service endpoints. @@ -43,7 +43,6 @@ public class SubnetInner extends SubResource { @JsonProperty(value = "properties.serviceEndpoints") private List serviceEndpoints; - /** * Gets an array of references to the network interface IP configurations * using subnet. @@ -77,7 +76,7 @@ public class SubnetInner extends SubResource { private String etag; /** - * Get the addressPrefix value. + * Get the address prefix for the subnet. * * @return the addressPrefix value */ @@ -86,7 +85,7 @@ public String addressPrefix() { } /** - * Set the addressPrefix value. + * Set the address prefix for the subnet. * * @param addressPrefix the addressPrefix value to set * @return the SubnetInner object itself. @@ -97,47 +96,47 @@ public SubnetInner withAddressPrefix(String addressPrefix) { } /** - * Get the networkSecurityGroup value. + * Get the reference of the NetworkSecurityGroup resource. * * @return the networkSecurityGroup value */ - public SubResource networkSecurityGroup() { + public NetworkSecurityGroupInner networkSecurityGroup() { return this.networkSecurityGroup; } /** - * Set the networkSecurityGroup value. + * Set the reference of the NetworkSecurityGroup resource. * * @param networkSecurityGroup the networkSecurityGroup value to set * @return the SubnetInner object itself. */ - public SubnetInner withNetworkSecurityGroup(SubResource networkSecurityGroup) { + public SubnetInner withNetworkSecurityGroup(NetworkSecurityGroupInner networkSecurityGroup) { this.networkSecurityGroup = networkSecurityGroup; return this; } /** - * Get the routeTable value. + * Get the reference of the RouteTable resource. * * @return the routeTable value */ - public SubResource routeTable() { + public RouteTableInner routeTable() { return this.routeTable; } /** - * Set the routeTable value. + * Set the reference of the RouteTable resource. * * @param routeTable the routeTable value to set * @return the SubnetInner object itself. */ - public SubResource withRouteTable(SubResource routeTable) { + public SubnetInner withRouteTable(RouteTableInner routeTable) { this.routeTable = routeTable; return this; } /** - * Get the serviceEndpoints value. + * Get an array of service endpoints. * * @return the serviceEndpoints value */ @@ -146,7 +145,7 @@ public List serviceEndpoints() { } /** - * Set the serviceEndpoints value. + * Set an array of service endpoints. * * @param serviceEndpoints the serviceEndpoints value to set * @return the SubnetInner object itself. @@ -157,7 +156,7 @@ public SubnetInner withServiceEndpoints(List se } /** - * Get the ipConfigurations value. + * Get gets an array of references to the network interface IP configurations using subnet. * * @return the ipConfigurations value */ @@ -166,7 +165,7 @@ public List ipConfigurations() { } /** - * Get the resourceNavigationLinks value. + * Get gets an array of references to the external resources using subnet. * * @return the resourceNavigationLinks value */ @@ -175,7 +174,7 @@ public List resourceNavigationLinks() { } /** - * Set the resourceNavigationLinks value. + * Set gets an array of references to the external resources using subnet. * * @param resourceNavigationLinks the resourceNavigationLinks value to set * @return the SubnetInner object itself. @@ -186,7 +185,7 @@ public SubnetInner withResourceNavigationLinks(List } /** - * Get the provisioningState value. + * Get the provisioning state of the resource. * * @return the provisioningState value */ @@ -195,7 +194,7 @@ public String provisioningState() { } /** - * Set the provisioningState value. + * Set the provisioning state of the resource. * * @param provisioningState the provisioningState value to set * @return the SubnetInner object itself. @@ -206,7 +205,7 @@ public SubnetInner withProvisioningState(String provisioningState) { } /** - * Get the name value. + * Get the name of the resource that is unique within a resource group. This name can be used to access the resource. * * @return the name value */ @@ -215,7 +214,7 @@ public String name() { } /** - * Set the name value. + * Set the name of the resource that is unique within a resource group. This name can be used to access the resource. * * @param name the name value to set * @return the SubnetInner object itself. @@ -226,7 +225,7 @@ public SubnetInner withName(String name) { } /** - * Get the etag value. + * Get a unique read-only string that changes whenever the resource is updated. * * @return the etag value */ @@ -235,7 +234,7 @@ public String etag() { } /** - * Set the etag value. + * Set a unique read-only string that changes whenever the resource is updated. * * @param etag the etag value to set * @return the SubnetInner object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SubnetsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SubnetsInner.java index 7ca792e8461..2f8f0592259 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SubnetsInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SubnetsInner.java @@ -159,7 +159,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.delete(resourceGroupName, virtualNetworkName, subnetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -232,7 +232,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, virtualNetworkName, subnetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -250,8 +250,8 @@ public Observable> call(Response response) { private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -325,7 +325,7 @@ public Observable> getWithServiceResponseAsync(Stri if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; final String expand = null; return service.get(resourceGroupName, virtualNetworkName, subnetName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -414,7 +414,7 @@ public Observable> getWithServiceResponseAsync(Stri if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.get(resourceGroupName, virtualNetworkName, subnetName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -513,7 +513,7 @@ public Observable> createOrUpdateWithServiceRespons throw new IllegalArgumentException("Parameter subnetParameters is required and cannot be null."); } Validator.validate(subnetParameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.createOrUpdate(resourceGroupName, virtualNetworkName, subnetName, this.client.subscriptionId(), subnetParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -595,7 +595,7 @@ public Observable> beginCreateOrUpdateWithServiceRe throw new IllegalArgumentException("Parameter subnetParameters is required and cannot be null."); } Validator.validate(subnetParameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, virtualNetworkName, subnetName, this.client.subscriptionId(), subnetParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -717,7 +717,7 @@ public Observable>> listSinglePageAsync(final if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/TopologyInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/TopologyInner.java index 16d8e5cd32a..f87a5992754 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/TopologyInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/TopologyInner.java @@ -43,7 +43,7 @@ public class TopologyInner { private List resources; /** - * Get the id value. + * Get gUID representing the operation id. * * @return the id value */ @@ -52,7 +52,7 @@ public String id() { } /** - * Get the createdDateTime value. + * Get the datetime when the topology was initially created for the resource group. * * @return the createdDateTime value */ @@ -61,7 +61,7 @@ public DateTime createdDateTime() { } /** - * Get the lastModified value. + * Get the datetime when the topology was last modified. * * @return the lastModified value */ diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/TopologyParametersInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/TopologyParametersInner.java new file mode 100644 index 00000000000..5572c37a4b9 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/TopologyParametersInner.java @@ -0,0 +1,96 @@ +/** + * 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.network.implementation; + +import com.microsoft.azure.SubResource; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameters that define the representation of topology. + */ +public class TopologyParametersInner { + /** + * The name of the target resource group to perform topology on. + */ + @JsonProperty(value = "targetResourceGroupName") + private String targetResourceGroupName; + + /** + * The reference of the Virtual Network resource. + */ + @JsonProperty(value = "targetVirtualNetwork") + private SubResource targetVirtualNetwork; + + /** + * The reference of the Subnet resource. + */ + @JsonProperty(value = "targetSubnet") + private SubResource targetSubnet; + + /** + * Get the targetResourceGroupName value. + * + * @return the targetResourceGroupName value + */ + public String targetResourceGroupName() { + return this.targetResourceGroupName; + } + + /** + * Set the targetResourceGroupName value. + * + * @param targetResourceGroupName the targetResourceGroupName value to set + * @return the TopologyParametersInner object itself. + */ + public TopologyParametersInner withTargetResourceGroupName(String targetResourceGroupName) { + this.targetResourceGroupName = targetResourceGroupName; + return this; + } + + /** + * Get the targetVirtualNetwork value. + * + * @return the targetVirtualNetwork value + */ + public SubResource targetVirtualNetwork() { + return this.targetVirtualNetwork; + } + + /** + * Set the targetVirtualNetwork value. + * + * @param targetVirtualNetwork the targetVirtualNetwork value to set + * @return the TopologyParametersInner object itself. + */ + public TopologyParametersInner withTargetVirtualNetwork(SubResource targetVirtualNetwork) { + this.targetVirtualNetwork = targetVirtualNetwork; + return this; + } + + /** + * Get the targetSubnet value. + * + * @return the targetSubnet value + */ + public SubResource targetSubnet() { + return this.targetSubnet; + } + + /** + * Set the targetSubnet value. + * + * @param targetSubnet the targetSubnet value to set + * @return the TopologyParametersInner object itself. + */ + public TopologyParametersInner withTargetSubnet(SubResource targetSubnet) { + this.targetSubnet = targetSubnet; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/TroubleshootingResultInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/TroubleshootingResultInner.java index 13535d861d2..85b636a604b 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/TroubleshootingResultInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/TroubleshootingResultInner.java @@ -42,7 +42,7 @@ public class TroubleshootingResultInner { private List results; /** - * Get the startTime value. + * Get the start time of the troubleshooting. * * @return the startTime value */ @@ -51,7 +51,7 @@ public DateTime startTime() { } /** - * Set the startTime value. + * Set the start time of the troubleshooting. * * @param startTime the startTime value to set * @return the TroubleshootingResultInner object itself. @@ -62,7 +62,7 @@ public TroubleshootingResultInner withStartTime(DateTime startTime) { } /** - * Get the endTime value. + * Get the end time of the troubleshooting. * * @return the endTime value */ @@ -71,7 +71,7 @@ public DateTime endTime() { } /** - * Set the endTime value. + * Set the end time of the troubleshooting. * * @param endTime the endTime value to set * @return the TroubleshootingResultInner object itself. @@ -82,7 +82,7 @@ public TroubleshootingResultInner withEndTime(DateTime endTime) { } /** - * Get the code value. + * Get the result code of the troubleshooting. * * @return the code value */ @@ -91,7 +91,7 @@ public String code() { } /** - * Set the code value. + * Set the result code of the troubleshooting. * * @param code the code value to set * @return the TroubleshootingResultInner object itself. @@ -102,7 +102,7 @@ public TroubleshootingResultInner withCode(String code) { } /** - * Get the results value. + * Get information from troubleshooting. * * @return the results value */ @@ -111,7 +111,7 @@ public List results() { } /** - * Set the results value. + * Set information from troubleshooting. * * @param results the results value to set * @return the TroubleshootingResultInner object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/UsageInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/UsageInner.java index 481b80207b6..89ae4fe8404 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/UsageInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/UsageInner.java @@ -15,6 +15,12 @@ * Describes network resource usage. */ public class UsageInner { + /** + * Resource identifier. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + /** * An enum describing the unit of measurement. */ @@ -41,13 +47,25 @@ public class UsageInner { /** * Creates an instance of UsageInner class. + * @param currentValue the current value of the usage. + * @param limit the limit of usage. + * @param name the name of the type of usage. */ public UsageInner() { unit = "Count"; } /** - * Get the unit value. + * Get resource identifier. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Get an enum describing the unit of measurement. * * @return the unit value */ @@ -56,7 +74,7 @@ public String unit() { } /** - * Set the unit value. + * Set an enum describing the unit of measurement. * * @param unit the unit value to set * @return the UsageInner object itself. @@ -67,7 +85,7 @@ public UsageInner withUnit(String unit) { } /** - * Get the currentValue value. + * Get the current value of the usage. * * @return the currentValue value */ @@ -76,7 +94,7 @@ public long currentValue() { } /** - * Set the currentValue value. + * Set the current value of the usage. * * @param currentValue the currentValue value to set * @return the UsageInner object itself. @@ -87,7 +105,7 @@ public UsageInner withCurrentValue(long currentValue) { } /** - * Get the limit value. + * Get the limit of usage. * * @return the limit value */ @@ -96,7 +114,7 @@ public long limit() { } /** - * Set the limit value. + * Set the limit of usage. * * @param limit the limit value to set * @return the UsageInner object itself. @@ -107,7 +125,7 @@ public UsageInner withLimit(long limit) { } /** - * Get the name value. + * Get the name of the type of usage. * * @return the name value */ @@ -116,7 +134,7 @@ public UsageName name() { } /** - * Set the name value. + * Set the name of the type of usage. * * @param name the name value to set * @return the UsageInner object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/UsagesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/UsagesInner.java index 047a6c7fea4..fcf8acc3178 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/UsagesInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/UsagesInner.java @@ -67,7 +67,7 @@ interface UsagesService { } /** - * Lists compute usages for a subscription. + * List network usages for a subscription. * * @param location The location where resource usage is queried. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -86,7 +86,7 @@ public Page nextPage(String nextPageLink) { } /** - * Lists compute usages for a subscription. + * List network usages for a subscription. * * @param location The location where resource usage is queried. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. @@ -106,7 +106,7 @@ public Observable>> call(String nextPageLink) { } /** - * Lists compute usages for a subscription. + * List network usages for a subscription. * * @param location The location where resource usage is queried. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -123,7 +123,7 @@ public Page call(ServiceResponse> response) { } /** - * Lists compute usages for a subscription. + * List network usages for a subscription. * * @param location The location where resource usage is queried. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -144,7 +144,7 @@ public Observable>> call(ServiceResponse> * @param location The location where resource usage is queried. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -157,7 +157,7 @@ public Observable>> listSinglePageAsync(final S if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(location, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -180,7 +180,7 @@ private ServiceResponse> listDelegate(Response nextPage(String nextPageLink) { } /** - * Lists compute usages for a subscription. + * List network usages for a subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceFuture the ServiceFuture object tracking the Retrofit calls @@ -220,7 +220,7 @@ public Observable>> call(String nextPageLink) { } /** - * Lists compute usages for a subscription. + * List network usages for a subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -237,7 +237,7 @@ public Page call(ServiceResponse> response) { } /** - * Lists compute usages for a subscription. + * List network usages for a subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -258,7 +258,7 @@ public Observable>> call(ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VerificationIPFlowParametersInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VerificationIPFlowParametersInner.java index c787a41d9fe..5f2c7f4bd45 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VerificationIPFlowParametersInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VerificationIPFlowParametersInner.java @@ -9,7 +9,7 @@ package com.microsoft.azure.management.network.implementation; import com.microsoft.azure.management.network.Direction; -import com.microsoft.azure.management.network.Protocol; +import com.microsoft.azure.management.network.IpFlowProtocol; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -33,7 +33,7 @@ public class VerificationIPFlowParametersInner { * Protocol to be verified on. Possible values include: 'TCP', 'UDP'. */ @JsonProperty(value = "protocol", required = true) - private Protocol protocol; + private IpFlowProtocol protocol; /** * The local port. Acceptable values are a single integer in the range @@ -115,7 +115,7 @@ public VerificationIPFlowParametersInner withDirection(Direction direction) { * * @return the protocol value */ - public Protocol protocol() { + public IpFlowProtocol protocol() { return this.protocol; } @@ -125,7 +125,7 @@ public Protocol protocol() { * @param protocol the protocol value to set * @return the VerificationIPFlowParametersInner object itself. */ - public VerificationIPFlowParametersInner withProtocol(Protocol protocol) { + public VerificationIPFlowParametersInner withProtocol(IpFlowProtocol protocol) { this.protocol = protocol; return this; } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VerificationIPFlowResultInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VerificationIPFlowResultInner.java index 3474d41aef6..54d6934df9b 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VerificationIPFlowResultInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VerificationIPFlowResultInner.java @@ -30,7 +30,7 @@ public class VerificationIPFlowResultInner { private String ruleName; /** - * Get the access value. + * Get indicates whether the traffic is allowed or denied. Possible values include: 'Allow', 'Deny'. * * @return the access value */ @@ -39,7 +39,7 @@ public Access access() { } /** - * Set the access value. + * Set indicates whether the traffic is allowed or denied. Possible values include: 'Allow', 'Deny'. * * @param access the access value to set * @return the VerificationIPFlowResultInner object itself. @@ -50,7 +50,7 @@ public VerificationIPFlowResultInner withAccess(Access access) { } /** - * Get the ruleName value. + * Get name of the rule. If input is not matched against any security rule, it is not displayed. * * @return the ruleName value */ @@ -59,7 +59,7 @@ public String ruleName() { } /** - * Set the ruleName value. + * Set name of the rule. If input is not matched against any security rule, it is not displayed. * * @param ruleName the ruleName value to set * @return the VerificationIPFlowResultInner object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkGatewayConnectionInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkGatewayConnectionInner.java index b52e097be1a..04f6ce95ac1 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkGatewayConnectionInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkGatewayConnectionInner.java @@ -16,12 +16,14 @@ import com.microsoft.azure.management.network.IpsecPolicy; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; import com.microsoft.azure.Resource; /** * A common class for general resource information. */ @JsonFlatten +@SkipParentValidation public class VirtualNetworkGatewayConnectionInner extends Resource { /** * The authorizationKey. @@ -33,19 +35,19 @@ public class VirtualNetworkGatewayConnectionInner extends Resource { * The reference to virtual network gateway resource. */ @JsonProperty(value = "properties.virtualNetworkGateway1", required = true) - private SubResource virtualNetworkGateway1; + private VirtualNetworkGatewayInner virtualNetworkGateway1; /** * The reference to virtual network gateway resource. */ @JsonProperty(value = "properties.virtualNetworkGateway2") - private SubResource virtualNetworkGateway2; + private VirtualNetworkGatewayInner virtualNetworkGateway2; /** * The reference to local network gateway resource. */ @JsonProperty(value = "properties.localNetworkGateway2") - private SubResource localNetworkGateway2; + private LocalNetworkGatewayInner localNetworkGateway2; /** * Gateway connection type. Possible values are: @@ -139,7 +141,13 @@ public class VirtualNetworkGatewayConnectionInner extends Resource { private String etag; /** - * Get the authorizationKey value. + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get the authorizationKey. * * @return the authorizationKey value */ @@ -148,7 +156,7 @@ public String authorizationKey() { } /** - * Set the authorizationKey value. + * Set the authorizationKey. * * @param authorizationKey the authorizationKey value to set * @return the VirtualNetworkGatewayConnectionInner object itself. @@ -159,67 +167,67 @@ public VirtualNetworkGatewayConnectionInner withAuthorizationKey(String authoriz } /** - * Get the virtualNetworkGateway1 value. + * Get the reference to virtual network gateway resource. * * @return the virtualNetworkGateway1 value */ - public SubResource virtualNetworkGateway1() { + public VirtualNetworkGatewayInner virtualNetworkGateway1() { return this.virtualNetworkGateway1; } /** - * Set the virtualNetworkGateway1 value. + * Set the reference to virtual network gateway resource. * * @param virtualNetworkGateway1 the virtualNetworkGateway1 value to set * @return the VirtualNetworkGatewayConnectionInner object itself. */ - public VirtualNetworkGatewayConnectionInner withVirtualNetworkGateway1(SubResource virtualNetworkGateway1) { + public VirtualNetworkGatewayConnectionInner withVirtualNetworkGateway1(VirtualNetworkGatewayInner virtualNetworkGateway1) { this.virtualNetworkGateway1 = virtualNetworkGateway1; return this; } /** - * Get the virtualNetworkGateway2 value. + * Get the reference to virtual network gateway resource. * * @return the virtualNetworkGateway2 value */ - public SubResource virtualNetworkGateway2() { + public VirtualNetworkGatewayInner virtualNetworkGateway2() { return this.virtualNetworkGateway2; } /** - * Set the virtualNetworkGateway2 value. + * Set the reference to virtual network gateway resource. * * @param virtualNetworkGateway2 the virtualNetworkGateway2 value to set * @return the VirtualNetworkGatewayConnectionInner object itself. */ - public VirtualNetworkGatewayConnectionInner withVirtualNetworkGateway2(SubResource virtualNetworkGateway2) { + public VirtualNetworkGatewayConnectionInner withVirtualNetworkGateway2(VirtualNetworkGatewayInner virtualNetworkGateway2) { this.virtualNetworkGateway2 = virtualNetworkGateway2; return this; } /** - * Get the localNetworkGateway2 value. + * Get the reference to local network gateway resource. * * @return the localNetworkGateway2 value */ - public SubResource localNetworkGateway2() { + public LocalNetworkGatewayInner localNetworkGateway2() { return this.localNetworkGateway2; } /** - * Set the localNetworkGateway2 value. + * Set the reference to local network gateway resource. * * @param localNetworkGateway2 the localNetworkGateway2 value to set * @return the VirtualNetworkGatewayConnectionInner object itself. */ - public VirtualNetworkGatewayConnectionInner withLocalNetworkGateway2(SubResource localNetworkGateway2) { + public VirtualNetworkGatewayConnectionInner withLocalNetworkGateway2(LocalNetworkGatewayInner localNetworkGateway2) { this.localNetworkGateway2 = localNetworkGateway2; return this; } /** - * Get the connectionType value. + * Get gateway connection type. Possible values are: 'Ipsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'. * * @return the connectionType value */ @@ -228,7 +236,7 @@ public VirtualNetworkGatewayConnectionType connectionType() { } /** - * Set the connectionType value. + * Set gateway connection type. Possible values are: 'Ipsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'. * * @param connectionType the connectionType value to set * @return the VirtualNetworkGatewayConnectionInner object itself. @@ -239,7 +247,7 @@ public VirtualNetworkGatewayConnectionInner withConnectionType(VirtualNetworkGat } /** - * Get the routingWeight value. + * Get the routing weight. * * @return the routingWeight value */ @@ -248,7 +256,7 @@ public Integer routingWeight() { } /** - * Set the routingWeight value. + * Set the routing weight. * * @param routingWeight the routingWeight value to set * @return the VirtualNetworkGatewayConnectionInner object itself. @@ -259,7 +267,7 @@ public VirtualNetworkGatewayConnectionInner withRoutingWeight(Integer routingWei } /** - * Get the sharedKey value. + * Get the IPSec shared key. * * @return the sharedKey value */ @@ -268,7 +276,7 @@ public String sharedKey() { } /** - * Set the sharedKey value. + * Set the IPSec shared key. * * @param sharedKey the sharedKey value to set * @return the VirtualNetworkGatewayConnectionInner object itself. @@ -279,7 +287,7 @@ public VirtualNetworkGatewayConnectionInner withSharedKey(String sharedKey) { } /** - * Get the connectionStatus value. + * Get virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'Unknown', 'Connecting', 'Connected', 'NotConnected'. * * @return the connectionStatus value */ @@ -288,7 +296,7 @@ public VirtualNetworkGatewayConnectionStatus connectionStatus() { } /** - * Get the tunnelConnectionStatus value. + * Get collection of all tunnels' connection health status. * * @return the tunnelConnectionStatus value */ @@ -297,7 +305,7 @@ public List tunnelConnectionStatus() { } /** - * Get the egressBytesTransferred value. + * Get the egress bytes transferred in this connection. * * @return the egressBytesTransferred value */ @@ -306,7 +314,7 @@ public Long egressBytesTransferred() { } /** - * Get the ingressBytesTransferred value. + * Get the ingress bytes transferred in this connection. * * @return the ingressBytesTransferred value */ @@ -315,7 +323,7 @@ public Long ingressBytesTransferred() { } /** - * Get the peer value. + * Get the reference to peerings resource. * * @return the peer value */ @@ -324,7 +332,7 @@ public SubResource peer() { } /** - * Set the peer value. + * Set the reference to peerings resource. * * @param peer the peer value to set * @return the VirtualNetworkGatewayConnectionInner object itself. @@ -335,7 +343,7 @@ public VirtualNetworkGatewayConnectionInner withPeer(SubResource peer) { } /** - * Get the enableBgp value. + * Get enableBgp flag. * * @return the enableBgp value */ @@ -344,7 +352,7 @@ public Boolean enableBgp() { } /** - * Set the enableBgp value. + * Set enableBgp flag. * * @param enableBgp the enableBgp value to set * @return the VirtualNetworkGatewayConnectionInner object itself. @@ -355,7 +363,7 @@ public VirtualNetworkGatewayConnectionInner withEnableBgp(Boolean enableBgp) { } /** - * Get the usePolicyBasedTrafficSelectors value. + * Get enable policy-based traffic selectors. * * @return the usePolicyBasedTrafficSelectors value */ @@ -364,7 +372,7 @@ public Boolean usePolicyBasedTrafficSelectors() { } /** - * Set the usePolicyBasedTrafficSelectors value. + * Set enable policy-based traffic selectors. * * @param usePolicyBasedTrafficSelectors the usePolicyBasedTrafficSelectors value to set * @return the VirtualNetworkGatewayConnectionInner object itself. @@ -375,7 +383,7 @@ public VirtualNetworkGatewayConnectionInner withUsePolicyBasedTrafficSelectors(B } /** - * Get the ipsecPolicies value. + * Get the IPSec Policies to be considered by this connection. * * @return the ipsecPolicies value */ @@ -384,7 +392,7 @@ public List ipsecPolicies() { } /** - * Set the ipsecPolicies value. + * Set the IPSec Policies to be considered by this connection. * * @param ipsecPolicies the ipsecPolicies value to set * @return the VirtualNetworkGatewayConnectionInner object itself. @@ -395,7 +403,7 @@ public VirtualNetworkGatewayConnectionInner withIpsecPolicies(List } /** - * Get the resourceGuid value. + * Get the resource GUID property of the VirtualNetworkGatewayConnection resource. * * @return the resourceGuid value */ @@ -404,7 +412,7 @@ public String resourceGuid() { } /** - * Set the resourceGuid value. + * Set the resource GUID property of the VirtualNetworkGatewayConnection resource. * * @param resourceGuid the resourceGuid value to set * @return the VirtualNetworkGatewayConnectionInner object itself. @@ -415,7 +423,7 @@ public VirtualNetworkGatewayConnectionInner withResourceGuid(String resourceGuid } /** - * Get the provisioningState value. + * Get the provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. * * @return the provisioningState value */ @@ -424,7 +432,7 @@ public String provisioningState() { } /** - * Get the etag value. + * Get gets a unique read-only string that changes whenever the resource is updated. * * @return the etag value */ @@ -433,7 +441,7 @@ public String etag() { } /** - * Set the etag value. + * Set gets a unique read-only string that changes whenever the resource is updated. * * @param etag the etag value to set * @return the VirtualNetworkGatewayConnectionInner object itself. @@ -443,4 +451,24 @@ public VirtualNetworkGatewayConnectionInner withEtag(String etag) { return this; } + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the VirtualNetworkGatewayConnectionInner object itself. + */ + public VirtualNetworkGatewayConnectionInner withId(String id) { + this.id = id; + return this; + } + } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkGatewayConnectionListEntityInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkGatewayConnectionListEntityInner.java index b1c112e8e63..ce75b14e4a7 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkGatewayConnectionListEntityInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkGatewayConnectionListEntityInner.java @@ -17,12 +17,14 @@ import com.microsoft.azure.management.network.IpsecPolicy; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; import com.microsoft.azure.Resource; /** * A common class for general resource information. */ @JsonFlatten +@SkipParentValidation public class VirtualNetworkGatewayConnectionListEntityInner extends Resource { /** * The authorizationKey. @@ -140,7 +142,13 @@ public class VirtualNetworkGatewayConnectionListEntityInner extends Resource { private String etag; /** - * Get the authorizationKey value. + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get the authorizationKey. * * @return the authorizationKey value */ @@ -149,7 +157,7 @@ public String authorizationKey() { } /** - * Set the authorizationKey value. + * Set the authorizationKey. * * @param authorizationKey the authorizationKey value to set * @return the VirtualNetworkGatewayConnectionListEntityInner object itself. @@ -160,7 +168,7 @@ public VirtualNetworkGatewayConnectionListEntityInner withAuthorizationKey(Strin } /** - * Get the virtualNetworkGateway1 value. + * Get the reference to virtual network gateway resource. * * @return the virtualNetworkGateway1 value */ @@ -169,7 +177,7 @@ public VirtualNetworkConnectionGatewayReference virtualNetworkGateway1() { } /** - * Set the virtualNetworkGateway1 value. + * Set the reference to virtual network gateway resource. * * @param virtualNetworkGateway1 the virtualNetworkGateway1 value to set * @return the VirtualNetworkGatewayConnectionListEntityInner object itself. @@ -180,7 +188,7 @@ public VirtualNetworkGatewayConnectionListEntityInner withVirtualNetworkGateway1 } /** - * Get the virtualNetworkGateway2 value. + * Get the reference to virtual network gateway resource. * * @return the virtualNetworkGateway2 value */ @@ -189,7 +197,7 @@ public VirtualNetworkConnectionGatewayReference virtualNetworkGateway2() { } /** - * Set the virtualNetworkGateway2 value. + * Set the reference to virtual network gateway resource. * * @param virtualNetworkGateway2 the virtualNetworkGateway2 value to set * @return the VirtualNetworkGatewayConnectionListEntityInner object itself. @@ -200,7 +208,7 @@ public VirtualNetworkGatewayConnectionListEntityInner withVirtualNetworkGateway2 } /** - * Get the localNetworkGateway2 value. + * Get the reference to local network gateway resource. * * @return the localNetworkGateway2 value */ @@ -209,7 +217,7 @@ public VirtualNetworkConnectionGatewayReference localNetworkGateway2() { } /** - * Set the localNetworkGateway2 value. + * Set the reference to local network gateway resource. * * @param localNetworkGateway2 the localNetworkGateway2 value to set * @return the VirtualNetworkGatewayConnectionListEntityInner object itself. @@ -220,7 +228,7 @@ public VirtualNetworkGatewayConnectionListEntityInner withLocalNetworkGateway2(V } /** - * Get the connectionType value. + * Get gateway connection type. Possible values are: 'Ipsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'. * * @return the connectionType value */ @@ -229,7 +237,7 @@ public VirtualNetworkGatewayConnectionType connectionType() { } /** - * Set the connectionType value. + * Set gateway connection type. Possible values are: 'Ipsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'. * * @param connectionType the connectionType value to set * @return the VirtualNetworkGatewayConnectionListEntityInner object itself. @@ -240,7 +248,7 @@ public VirtualNetworkGatewayConnectionListEntityInner withConnectionType(Virtual } /** - * Get the routingWeight value. + * Get the routing weight. * * @return the routingWeight value */ @@ -249,7 +257,7 @@ public Integer routingWeight() { } /** - * Set the routingWeight value. + * Set the routing weight. * * @param routingWeight the routingWeight value to set * @return the VirtualNetworkGatewayConnectionListEntityInner object itself. @@ -260,7 +268,7 @@ public VirtualNetworkGatewayConnectionListEntityInner withRoutingWeight(Integer } /** - * Get the sharedKey value. + * Get the IPSec shared key. * * @return the sharedKey value */ @@ -269,7 +277,7 @@ public String sharedKey() { } /** - * Set the sharedKey value. + * Set the IPSec shared key. * * @param sharedKey the sharedKey value to set * @return the VirtualNetworkGatewayConnectionListEntityInner object itself. @@ -280,7 +288,7 @@ public VirtualNetworkGatewayConnectionListEntityInner withSharedKey(String share } /** - * Get the connectionStatus value. + * Get virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'Unknown', 'Connecting', 'Connected', 'NotConnected'. * * @return the connectionStatus value */ @@ -289,7 +297,7 @@ public VirtualNetworkGatewayConnectionStatus connectionStatus() { } /** - * Get the tunnelConnectionStatus value. + * Get collection of all tunnels' connection health status. * * @return the tunnelConnectionStatus value */ @@ -298,7 +306,7 @@ public List tunnelConnectionStatus() { } /** - * Get the egressBytesTransferred value. + * Get the egress bytes transferred in this connection. * * @return the egressBytesTransferred value */ @@ -307,7 +315,7 @@ public Long egressBytesTransferred() { } /** - * Get the ingressBytesTransferred value. + * Get the ingress bytes transferred in this connection. * * @return the ingressBytesTransferred value */ @@ -316,7 +324,7 @@ public Long ingressBytesTransferred() { } /** - * Get the peer value. + * Get the reference to peerings resource. * * @return the peer value */ @@ -325,7 +333,7 @@ public SubResource peer() { } /** - * Set the peer value. + * Set the reference to peerings resource. * * @param peer the peer value to set * @return the VirtualNetworkGatewayConnectionListEntityInner object itself. @@ -336,7 +344,7 @@ public VirtualNetworkGatewayConnectionListEntityInner withPeer(SubResource peer) } /** - * Get the enableBgp value. + * Get enableBgp flag. * * @return the enableBgp value */ @@ -345,7 +353,7 @@ public Boolean enableBgp() { } /** - * Set the enableBgp value. + * Set enableBgp flag. * * @param enableBgp the enableBgp value to set * @return the VirtualNetworkGatewayConnectionListEntityInner object itself. @@ -356,7 +364,7 @@ public VirtualNetworkGatewayConnectionListEntityInner withEnableBgp(Boolean enab } /** - * Get the usePolicyBasedTrafficSelectors value. + * Get enable policy-based traffic selectors. * * @return the usePolicyBasedTrafficSelectors value */ @@ -365,7 +373,7 @@ public Boolean usePolicyBasedTrafficSelectors() { } /** - * Set the usePolicyBasedTrafficSelectors value. + * Set enable policy-based traffic selectors. * * @param usePolicyBasedTrafficSelectors the usePolicyBasedTrafficSelectors value to set * @return the VirtualNetworkGatewayConnectionListEntityInner object itself. @@ -376,7 +384,7 @@ public VirtualNetworkGatewayConnectionListEntityInner withUsePolicyBasedTrafficS } /** - * Get the ipsecPolicies value. + * Get the IPSec Policies to be considered by this connection. * * @return the ipsecPolicies value */ @@ -385,7 +393,7 @@ public List ipsecPolicies() { } /** - * Set the ipsecPolicies value. + * Set the IPSec Policies to be considered by this connection. * * @param ipsecPolicies the ipsecPolicies value to set * @return the VirtualNetworkGatewayConnectionListEntityInner object itself. @@ -396,7 +404,7 @@ public VirtualNetworkGatewayConnectionListEntityInner withIpsecPolicies(List> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayConnectionName") String virtualNetworkGatewayConnectionName, @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.network.VirtualNetworkGatewayConnections updateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}") + Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayConnectionName") String virtualNetworkGatewayConnectionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.VirtualNetworkGatewayConnections beginUpdateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}") + Observable> beginUpdateTags(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayConnectionName") String virtualNetworkGatewayConnectionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.VirtualNetworkGatewayConnections setSharedKey" }) @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey") Observable> setSharedKey(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayConnectionName") String virtualNetworkGatewayConnectionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body ConnectionSharedKeyInner parameters, @Header("User-Agent") String userAgent); @@ -184,7 +195,7 @@ public Observable> createO throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.createOrUpdate(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -259,7 +270,7 @@ public Observable> beginCr throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -344,7 +355,7 @@ public Observable> getByRe if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.getByResourceGroup(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -427,7 +438,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.delete(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -493,7 +504,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -517,6 +528,320 @@ private ServiceResponse beginDeleteDelegate(Response respons .build(response); } + /** + * Updates a virtual network gateway connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VirtualNetworkGatewayConnectionListEntityInner object if successful. + */ + public VirtualNetworkGatewayConnectionListEntityInner updateTags(String resourceGroupName, String virtualNetworkGatewayConnectionName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).toBlocking().last().body(); + } + + /** + * Updates a virtual network gateway connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateTagsAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName), serviceCallback); + } + + /** + * Updates a virtual network gateway connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateTagsAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).map(new Func1, VirtualNetworkGatewayConnectionListEntityInner>() { + @Override + public VirtualNetworkGatewayConnectionListEntityInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a virtual network gateway connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayConnectionName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + Observable> observable = service.updateTags(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Updates a virtual network gateway connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VirtualNetworkGatewayConnectionListEntityInner object if successful. + */ + public VirtualNetworkGatewayConnectionListEntityInner updateTags(String resourceGroupName, String virtualNetworkGatewayConnectionName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, tags).toBlocking().last().body(); + } + + /** + * Updates a virtual network gateway connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @param tags Resource tags. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateTagsAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, tags), serviceCallback); + } + + /** + * Updates a virtual network gateway connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateTagsAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, tags).map(new Func1, VirtualNetworkGatewayConnectionListEntityInner>() { + @Override + public VirtualNetworkGatewayConnectionListEntityInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a virtual network gateway connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayConnectionName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + Observable> observable = service.updateTags(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Updates a virtual network gateway connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VirtualNetworkGatewayConnectionListEntityInner object if successful. + */ + public VirtualNetworkGatewayConnectionListEntityInner beginUpdateTags(String resourceGroupName, String virtualNetworkGatewayConnectionName) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).toBlocking().single().body(); + } + + /** + * Updates a virtual network gateway connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName), serviceCallback); + } + + /** + * Updates a virtual network gateway connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkGatewayConnectionListEntityInner object + */ + public Observable beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).map(new Func1, VirtualNetworkGatewayConnectionListEntityInner>() { + @Override + public VirtualNetworkGatewayConnectionListEntityInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a virtual network gateway connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkGatewayConnectionListEntityInner object + */ + public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayConnectionName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.beginUpdateTags(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates a virtual network gateway connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VirtualNetworkGatewayConnectionListEntityInner object if successful. + */ + public VirtualNetworkGatewayConnectionListEntityInner beginUpdateTags(String resourceGroupName, String virtualNetworkGatewayConnectionName, Map tags) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, tags).toBlocking().single().body(); + } + + /** + * Updates a virtual network gateway connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @param tags Resource tags. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, tags), serviceCallback); + } + + /** + * Updates a virtual network gateway connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkGatewayConnectionListEntityInner object + */ + public Observable beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, Map tags) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, tags).map(new Func1, VirtualNetworkGatewayConnectionListEntityInner>() { + @Override + public VirtualNetworkGatewayConnectionListEntityInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a virtual network gateway connection tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkGatewayConnectionListEntityInner object + */ + public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayConnectionName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.beginUpdateTags(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateTagsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** * The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. * @@ -586,7 +911,7 @@ public Observable> setSharedKeyWithSer if (value == null) { throw new IllegalArgumentException("Parameter value is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; ConnectionSharedKeyInner parameters = new ConnectionSharedKeyInner(); parameters.withValue(value); Observable> observable = service.setSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); @@ -662,7 +987,7 @@ public Observable> beginSetSharedKeyWi if (value == null) { throw new IllegalArgumentException("Parameter value is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; ConnectionSharedKeyInner parameters = new ConnectionSharedKeyInner(); parameters.withValue(value); return service.beginSetSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) @@ -681,8 +1006,8 @@ public Observable> call(Response beginSetSharedKeyDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(201, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -749,7 +1074,7 @@ public Observable> getSharedKeyWithSer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.getSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -862,7 +1187,7 @@ public Observable>> l if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -950,7 +1275,7 @@ public Observable> resetSharedKey if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; ConnectionResetSharedKeyInner parameters = new ConnectionResetSharedKeyInner(); parameters.withKeyLength(keyLength); Observable> observable = service.resetSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); @@ -1023,7 +1348,7 @@ public Observable> beginResetShar if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; ConnectionResetSharedKeyInner parameters = new ConnectionResetSharedKeyInner(); parameters.withKeyLength(keyLength); return service.beginResetSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkGatewayIPConfigurationInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkGatewayIPConfigurationInner.java index 9d71088635a..571da8c5a74 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkGatewayIPConfigurationInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkGatewayIPConfigurationInner.java @@ -58,7 +58,7 @@ public class VirtualNetworkGatewayIPConfigurationInner extends SubResource { private String etag; /** - * Get the privateIPAllocationMethod value. + * Get the private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'. * * @return the privateIPAllocationMethod value */ @@ -67,7 +67,7 @@ public IPAllocationMethod privateIPAllocationMethod() { } /** - * Set the privateIPAllocationMethod value. + * Set the private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'. * * @param privateIPAllocationMethod the privateIPAllocationMethod value to set * @return the VirtualNetworkGatewayIPConfigurationInner object itself. @@ -78,7 +78,7 @@ public VirtualNetworkGatewayIPConfigurationInner withPrivateIPAllocationMethod(I } /** - * Get the subnet value. + * Get the reference of the subnet resource. * * @return the subnet value */ @@ -87,7 +87,7 @@ public SubResource subnet() { } /** - * Set the subnet value. + * Set the reference of the subnet resource. * * @param subnet the subnet value to set * @return the VirtualNetworkGatewayIPConfigurationInner object itself. @@ -98,7 +98,7 @@ public VirtualNetworkGatewayIPConfigurationInner withSubnet(SubResource subnet) } /** - * Get the publicIPAddress value. + * Get the reference of the public IP resource. * * @return the publicIPAddress value */ @@ -107,7 +107,7 @@ public SubResource publicIPAddress() { } /** - * Set the publicIPAddress value. + * Set the reference of the public IP resource. * * @param publicIPAddress the publicIPAddress value to set * @return the VirtualNetworkGatewayIPConfigurationInner object itself. @@ -118,7 +118,7 @@ public VirtualNetworkGatewayIPConfigurationInner withPublicIPAddress(SubResource } /** - * Get the provisioningState value. + * Get the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. * * @return the provisioningState value */ @@ -127,7 +127,7 @@ public String provisioningState() { } /** - * Get the name value. + * Get the name of the resource that is unique within a resource group. This name can be used to access the resource. * * @return the name value */ @@ -136,7 +136,7 @@ public String name() { } /** - * Set the name value. + * Set the name of the resource that is unique within a resource group. This name can be used to access the resource. * * @param name the name value to set * @return the VirtualNetworkGatewayIPConfigurationInner object itself. @@ -147,7 +147,7 @@ public VirtualNetworkGatewayIPConfigurationInner withName(String name) { } /** - * Get the etag value. + * Get a unique read-only string that changes whenever the resource is updated. * * @return the etag value */ @@ -156,7 +156,7 @@ public String etag() { } /** - * Set the etag value. + * Set a unique read-only string that changes whenever the resource is updated. * * @param etag the etag value to set * @return the VirtualNetworkGatewayIPConfigurationInner object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkGatewayInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkGatewayInner.java index 81ea1ff9af6..fd9fc0ace24 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkGatewayInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkGatewayInner.java @@ -17,12 +17,14 @@ import com.microsoft.azure.management.network.BgpSettings; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; import com.microsoft.azure.Resource; /** * A common class for general resource information. */ @JsonFlatten +@SkipParentValidation public class VirtualNetworkGatewayInner extends Resource { /** * IP configurations for virtual network gateway. @@ -106,7 +108,13 @@ public class VirtualNetworkGatewayInner extends Resource { private String etag; /** - * Get the ipConfigurations value. + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get iP configurations for virtual network gateway. * * @return the ipConfigurations value */ @@ -115,7 +123,7 @@ public List ipConfigurations() { } /** - * Set the ipConfigurations value. + * Set iP configurations for virtual network gateway. * * @param ipConfigurations the ipConfigurations value to set * @return the VirtualNetworkGatewayInner object itself. @@ -126,7 +134,7 @@ public VirtualNetworkGatewayInner withIpConfigurations(List> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @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.network.VirtualNetworkGateways updateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}") + Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.VirtualNetworkGateways beginUpdateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}") + Observable> beginUpdateTags(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.VirtualNetworkGateways listByResourceGroup" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways") Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -102,19 +115,27 @@ interface VirtualNetworkGatewaysService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.VirtualNetworkGateways generatevpnclientpackage" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnclientpackage") - Observable> generatevpnclientpackage(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Body VpnClientParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> generatevpnclientpackage(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Body VpnClientParameters 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.network.VirtualNetworkGateways beginGeneratevpnclientpackage" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnclientpackage") - Observable> beginGeneratevpnclientpackage(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Body VpnClientParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> beginGeneratevpnclientpackage(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Body VpnClientParameters 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.network.VirtualNetworkGateways generateVpnProfile" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnprofile") - Observable> generateVpnProfile(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Body VpnClientParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> generateVpnProfile(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Body VpnClientParameters 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.network.VirtualNetworkGateways beginGenerateVpnProfile" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnprofile") - Observable> beginGenerateVpnProfile(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Body VpnClientParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> beginGenerateVpnProfile(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Body VpnClientParameters 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.network.VirtualNetworkGateways getVpnProfilePackageUrl" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnprofilepackageurl") + Observable> getVpnProfilePackageUrl(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @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.network.VirtualNetworkGateways beginGetVpnProfilePackageUrl" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnprofilepackageurl") + Observable> beginGetVpnProfilePackageUrl(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @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.network.VirtualNetworkGateways getBgpPeerStatus" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getBgpPeerStatus") @@ -124,6 +145,10 @@ interface VirtualNetworkGatewaysService { @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getBgpPeerStatus") Observable> beginGetBgpPeerStatus(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Query("peer") String peer, @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.network.VirtualNetworkGateways supportedVpnDevices" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/supportedvpndevices") + Observable> supportedVpnDevices(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @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.network.VirtualNetworkGateways getLearnedRoutes" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getLearnedRoutes") Observable> getLearnedRoutes(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -140,6 +165,26 @@ interface VirtualNetworkGatewaysService { @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getAdvertisedRoutes") Observable> beginGetAdvertisedRoutes(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Query("peer") String peer, @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.network.VirtualNetworkGateways setVpnclientIpsecParameters" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/setvpnclientipsecparameters") + Observable> setVpnclientIpsecParameters(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Body VpnClientIPsecParametersInner vpnclientIpsecParams, @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.network.VirtualNetworkGateways beginSetVpnclientIpsecParameters" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/setvpnclientipsecparameters") + Observable> beginSetVpnclientIpsecParameters(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Body VpnClientIPsecParametersInner vpnclientIpsecParams, @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.network.VirtualNetworkGateways getVpnclientIpsecParameters" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnclientipsecparameters") + Observable> getVpnclientIpsecParameters(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @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.network.VirtualNetworkGateways beginGetVpnclientIpsecParameters" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnclientipsecparameters") + Observable> beginGetVpnclientIpsecParameters(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @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.network.VirtualNetworkGateways vpnDeviceConfigurationScript" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/vpndeviceconfigurationscript") + Observable> vpnDeviceConfigurationScript(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayConnectionName") String virtualNetworkGatewayConnectionName, @Path("subscriptionId") String subscriptionId, @Body VpnDeviceScriptParameters 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.network.VirtualNetworkGateways listByResourceGroupNext" }) @GET Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -220,7 +265,7 @@ public Observable> createOrUpdateWit throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.createOrUpdate(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -295,7 +340,7 @@ public Observable> beginCreateOrUpda throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -380,7 +425,7 @@ public Observable> getByResourceGrou if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.getByResourceGroup(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -463,7 +508,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.delete(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -529,7 +574,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -546,9 +591,323 @@ public Observable> call(Response response) { private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates a virtual network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VirtualNetworkGatewayInner object if successful. + */ + public VirtualNetworkGatewayInner updateTags(String resourceGroupName, String virtualNetworkGatewayName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().last().body(); + } + + /** + * Updates a virtual network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateTagsAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); + } + + /** + * Updates a virtual network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateTagsAsync(String resourceGroupName, String virtualNetworkGatewayName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, VirtualNetworkGatewayInner>() { + @Override + public VirtualNetworkGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a virtual network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + Observable> observable = service.updateTags(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Updates a virtual network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VirtualNetworkGatewayInner object if successful. + */ + public VirtualNetworkGatewayInner updateTags(String resourceGroupName, String virtualNetworkGatewayName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, tags).toBlocking().last().body(); + } + + /** + * Updates a virtual network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param tags Resource tags. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateTagsAsync(String resourceGroupName, String virtualNetworkGatewayName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, tags), serviceCallback); + } + + /** + * Updates a virtual network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateTagsAsync(String resourceGroupName, String virtualNetworkGatewayName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, tags).map(new Func1, VirtualNetworkGatewayInner>() { + @Override + public VirtualNetworkGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a virtual network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + Observable> observable = service.updateTags(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Updates a virtual network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VirtualNetworkGatewayInner object if successful. + */ + public VirtualNetworkGatewayInner beginUpdateTags(String resourceGroupName, String virtualNetworkGatewayName) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().single().body(); + } + + /** + * Updates a virtual network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); + } + + /** + * Updates a virtual network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkGatewayInner object + */ + public Observable beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkGatewayName) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, VirtualNetworkGatewayInner>() { + @Override + public VirtualNetworkGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a virtual network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkGatewayInner object + */ + public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.beginUpdateTags(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates a virtual network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VirtualNetworkGatewayInner object if successful. + */ + public VirtualNetworkGatewayInner beginUpdateTags(String resourceGroupName, String virtualNetworkGatewayName, Map tags) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, tags).toBlocking().single().body(); + } + + /** + * Updates a virtual network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param tags Resource tags. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkGatewayName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, tags), serviceCallback); + } + + /** + * Updates a virtual network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkGatewayInner object + */ + public Observable beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkGatewayName, Map tags) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, tags).map(new Func1, VirtualNetworkGatewayInner>() { + @Override + public VirtualNetworkGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a virtual network gateway tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkGatewayInner object + */ + public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.beginUpdateTags(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateTagsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -644,7 +1003,7 @@ public Observable>> listByResou if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -765,7 +1124,7 @@ public Observable, Observable>>>() { @Override @@ -849,7 +1208,7 @@ public Observable> resetWithServiceR if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; final String gatewayVip = null; Observable> observable = service.reset(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), gatewayVip, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); @@ -920,7 +1279,7 @@ public Observable> resetWithServiceR if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.reset(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), gatewayVip, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -987,7 +1346,7 @@ public Observable> beginResetWithSer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; final String gatewayVip = null; return service.beginReset(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), gatewayVip, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -1069,7 +1428,7 @@ public Observable> beginResetWithSer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginReset(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), gatewayVip, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1086,8 +1445,8 @@ public Observable> call(Response beginResetDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(202, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -1103,7 +1462,7 @@ private ServiceResponse beginResetDelegate(Response< * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the String object if successful. */ - public String generatevpnclientpackage(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParametersInner parameters) { + public String generatevpnclientpackage(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { return generatevpnclientpackageWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).toBlocking().last().body(); } @@ -1117,7 +1476,7 @@ public String generatevpnclientpackage(String resourceGroupName, String virtualN * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture generatevpnclientpackageAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParametersInner parameters, final ServiceCallback serviceCallback) { + public ServiceFuture generatevpnclientpackageAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(generatevpnclientpackageWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters), serviceCallback); } @@ -1130,7 +1489,7 @@ public ServiceFuture generatevpnclientpackageAsync(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable generatevpnclientpackageAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParametersInner parameters) { + public Observable generatevpnclientpackageAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { return generatevpnclientpackageWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).map(new Func1, String>() { @Override public String call(ServiceResponse response) { @@ -1148,7 +1507,7 @@ public String call(ServiceResponse response) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable> generatevpnclientpackageWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParametersInner parameters) { + public Observable> generatevpnclientpackageWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1162,7 +1521,7 @@ public Observable> generatevpnclientpackageWithServiceRe throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.generatevpnclientpackage(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -1178,7 +1537,7 @@ public Observable> generatevpnclientpackageWithServiceRe * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the String object if successful. */ - public String beginGeneratevpnclientpackage(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParametersInner parameters) { + public String beginGeneratevpnclientpackage(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { return beginGeneratevpnclientpackageWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).toBlocking().single().body(); } @@ -1192,7 +1551,7 @@ public String beginGeneratevpnclientpackage(String resourceGroupName, String vir * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginGeneratevpnclientpackageAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParametersInner parameters, final ServiceCallback serviceCallback) { + public ServiceFuture beginGeneratevpnclientpackageAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginGeneratevpnclientpackageWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters), serviceCallback); } @@ -1205,7 +1564,7 @@ public ServiceFuture beginGeneratevpnclientpackageAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the String object */ - public Observable beginGeneratevpnclientpackageAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParametersInner parameters) { + public Observable beginGeneratevpnclientpackageAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { return beginGeneratevpnclientpackageWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).map(new Func1, String>() { @Override public String call(ServiceResponse response) { @@ -1223,7 +1582,7 @@ public String call(ServiceResponse response) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the String object */ - public Observable> beginGeneratevpnclientpackageWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParametersInner parameters) { + public Observable> beginGeneratevpnclientpackageWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1237,7 +1596,7 @@ public Observable> beginGeneratevpnclientpackageWithServ throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginGeneratevpnclientpackage(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1270,7 +1629,7 @@ private ServiceResponse beginGeneratevpnclientpackageDelegate(Response generateVpnProfileAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParametersInner parameters, final ServiceCallback serviceCallback) { + public ServiceFuture generateVpnProfileAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(generateVpnProfileWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters), serviceCallback); } @@ -1297,7 +1656,7 @@ public ServiceFuture generateVpnProfileAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable generateVpnProfileAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParametersInner parameters) { + public Observable generateVpnProfileAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { return generateVpnProfileWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).map(new Func1, String>() { @Override public String call(ServiceResponse response) { @@ -1315,7 +1674,7 @@ public String call(ServiceResponse response) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable> generateVpnProfileWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParametersInner parameters) { + public Observable> generateVpnProfileWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1329,7 +1688,7 @@ public Observable> generateVpnProfileWithServiceResponse throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.generateVpnProfile(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -1345,7 +1704,7 @@ public Observable> generateVpnProfileWithServiceResponse * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the String object if successful. */ - public String beginGenerateVpnProfile(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParametersInner parameters) { + public String beginGenerateVpnProfile(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { return beginGenerateVpnProfileWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).toBlocking().single().body(); } @@ -1359,7 +1718,7 @@ public String beginGenerateVpnProfile(String resourceGroupName, String virtualNe * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginGenerateVpnProfileAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParametersInner parameters, final ServiceCallback serviceCallback) { + public ServiceFuture beginGenerateVpnProfileAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginGenerateVpnProfileWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters), serviceCallback); } @@ -1372,7 +1731,7 @@ public ServiceFuture beginGenerateVpnProfileAsync(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the String object */ - public Observable beginGenerateVpnProfileAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParametersInner parameters) { + public Observable beginGenerateVpnProfileAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { return beginGenerateVpnProfileWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).map(new Func1, String>() { @Override public String call(ServiceResponse response) { @@ -1390,7 +1749,7 @@ public String call(ServiceResponse response) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the String object */ - public Observable> beginGenerateVpnProfileWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParametersInner parameters) { + public Observable> beginGenerateVpnProfileWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1404,7 +1763,7 @@ public Observable> beginGenerateVpnProfileWithServiceRes throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginGenerateVpnProfile(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1422,6 +1781,159 @@ public Observable> call(Response response) private ServiceResponse beginGenerateVpnProfileDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the String object if successful. + */ + public String getVpnProfilePackageUrl(String resourceGroupName, String virtualNetworkGatewayName) { + return getVpnProfilePackageUrlWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().last().body(); + } + + /** + * Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getVpnProfilePackageUrlAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getVpnProfilePackageUrlWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); + } + + /** + * Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable getVpnProfilePackageUrlAsync(String resourceGroupName, String virtualNetworkGatewayName) { + return getVpnProfilePackageUrlWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, String>() { + @Override + public String call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> getVpnProfilePackageUrlWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + Observable> observable = service.getVpnProfilePackageUrl(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the String object if successful. + */ + public String beginGetVpnProfilePackageUrl(String resourceGroupName, String virtualNetworkGatewayName) { + return beginGetVpnProfilePackageUrlWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().single().body(); + } + + /** + * Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginGetVpnProfilePackageUrlAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginGetVpnProfilePackageUrlWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); + } + + /** + * Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable beginGetVpnProfilePackageUrlAsync(String resourceGroupName, String virtualNetworkGatewayName) { + return beginGetVpnProfilePackageUrlWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, String>() { + @Override + public String call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable> beginGetVpnProfilePackageUrlWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + return service.beginGetVpnProfilePackageUrl(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginGetVpnProfilePackageUrlDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginGetVpnProfilePackageUrlDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -1488,7 +2000,7 @@ public Observable> getBgpPeerStatu if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; final String peer = null; Observable> observable = service.getBgpPeerStatus(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), peer, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); @@ -1559,7 +2071,7 @@ public Observable> getBgpPeerStatu if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.getBgpPeerStatus(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), peer, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -1626,7 +2138,7 @@ public Observable> beginGetBgpPeer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; final String peer = null; return service.beginGetBgpPeerStatus(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), peer, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -1708,7 +2220,7 @@ public Observable> beginGetBgpPeer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginGetBgpPeerStatus(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), peer, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1731,6 +2243,90 @@ private ServiceResponse beginGetBgpPeerStatusDeleg .build(response); } + /** + * Gets a xml format representation for supported vpn devices. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the String object if successful. + */ + public String supportedVpnDevices(String resourceGroupName, String virtualNetworkGatewayName) { + return supportedVpnDevicesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().single().body(); + } + + /** + * Gets a xml format representation for supported vpn devices. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture supportedVpnDevicesAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(supportedVpnDevicesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); + } + + /** + * Gets a xml format representation for supported vpn devices. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable supportedVpnDevicesAsync(String resourceGroupName, String virtualNetworkGatewayName) { + return supportedVpnDevicesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, String>() { + @Override + public String call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a xml format representation for supported vpn devices. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable> supportedVpnDevicesWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + return service.supportedVpnDevices(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = supportedVpnDevicesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse supportedVpnDevicesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** * This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. * @@ -1793,7 +2389,7 @@ public Observable> getLearnedRoutes if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.getLearnedRoutes(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -1860,7 +2456,7 @@ public Observable> beginGetLearnedR if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginGetLearnedRoutes(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1952,7 +2548,7 @@ public Observable> getAdvertisedRou if (peer == null) { throw new IllegalArgumentException("Parameter peer is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.getAdvertisedRoutes(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), peer, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -2026,7 +2622,7 @@ public Observable> beginGetAdvertis if (peer == null) { throw new IllegalArgumentException("Parameter peer is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginGetAdvertisedRoutes(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), peer, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -2049,6 +2645,417 @@ private ServiceResponse beginGetAdvertisedRoutesDel .build(response); } + /** + * The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param vpnclientIpsecParams Parameters supplied to the Begin Set vpnclient ipsec parameters of Virtual Network Gateway P2S client operation through Network resource provider. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VpnClientIPsecParametersInner object if successful. + */ + public VpnClientIPsecParametersInner setVpnclientIpsecParameters(String resourceGroupName, String virtualNetworkGatewayName, VpnClientIPsecParametersInner vpnclientIpsecParams) { + return setVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, vpnclientIpsecParams).toBlocking().last().body(); + } + + /** + * The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param vpnclientIpsecParams Parameters supplied to the Begin Set vpnclient ipsec parameters of Virtual Network Gateway P2S client operation through Network resource provider. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture setVpnclientIpsecParametersAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientIPsecParametersInner vpnclientIpsecParams, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(setVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, vpnclientIpsecParams), serviceCallback); + } + + /** + * The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param vpnclientIpsecParams Parameters supplied to the Begin Set vpnclient ipsec parameters of Virtual Network Gateway P2S client operation through Network resource provider. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable setVpnclientIpsecParametersAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientIPsecParametersInner vpnclientIpsecParams) { + return setVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, vpnclientIpsecParams).map(new Func1, VpnClientIPsecParametersInner>() { + @Override + public VpnClientIPsecParametersInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param vpnclientIpsecParams Parameters supplied to the Begin Set vpnclient ipsec parameters of Virtual Network Gateway P2S client operation through Network resource provider. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> setVpnclientIpsecParametersWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientIPsecParametersInner vpnclientIpsecParams) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (vpnclientIpsecParams == null) { + throw new IllegalArgumentException("Parameter vpnclientIpsecParams is required and cannot be null."); + } + Validator.validate(vpnclientIpsecParams); + final String apiVersion = "2018-04-01"; + Observable> observable = service.setVpnclientIpsecParameters(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), vpnclientIpsecParams, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param vpnclientIpsecParams Parameters supplied to the Begin Set vpnclient ipsec parameters of Virtual Network Gateway P2S client operation through Network resource provider. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VpnClientIPsecParametersInner object if successful. + */ + public VpnClientIPsecParametersInner beginSetVpnclientIpsecParameters(String resourceGroupName, String virtualNetworkGatewayName, VpnClientIPsecParametersInner vpnclientIpsecParams) { + return beginSetVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, vpnclientIpsecParams).toBlocking().single().body(); + } + + /** + * The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param vpnclientIpsecParams Parameters supplied to the Begin Set vpnclient ipsec parameters of Virtual Network Gateway P2S client operation through Network resource provider. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginSetVpnclientIpsecParametersAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientIPsecParametersInner vpnclientIpsecParams, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginSetVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, vpnclientIpsecParams), serviceCallback); + } + + /** + * The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param vpnclientIpsecParams Parameters supplied to the Begin Set vpnclient ipsec parameters of Virtual Network Gateway P2S client operation through Network resource provider. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnClientIPsecParametersInner object + */ + public Observable beginSetVpnclientIpsecParametersAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientIPsecParametersInner vpnclientIpsecParams) { + return beginSetVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, vpnclientIpsecParams).map(new Func1, VpnClientIPsecParametersInner>() { + @Override + public VpnClientIPsecParametersInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param vpnclientIpsecParams Parameters supplied to the Begin Set vpnclient ipsec parameters of Virtual Network Gateway P2S client operation through Network resource provider. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnClientIPsecParametersInner object + */ + public Observable> beginSetVpnclientIpsecParametersWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientIPsecParametersInner vpnclientIpsecParams) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (vpnclientIpsecParams == null) { + throw new IllegalArgumentException("Parameter vpnclientIpsecParams is required and cannot be null."); + } + Validator.validate(vpnclientIpsecParams); + final String apiVersion = "2018-04-01"; + return service.beginSetVpnclientIpsecParameters(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), vpnclientIpsecParams, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginSetVpnclientIpsecParametersDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginSetVpnclientIpsecParametersDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The virtual network gateway name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VpnClientIPsecParametersInner object if successful. + */ + public VpnClientIPsecParametersInner getVpnclientIpsecParameters(String resourceGroupName, String virtualNetworkGatewayName) { + return getVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().last().body(); + } + + /** + * The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The virtual network gateway name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getVpnclientIpsecParametersAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); + } + + /** + * The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The virtual network gateway name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable getVpnclientIpsecParametersAsync(String resourceGroupName, String virtualNetworkGatewayName) { + return getVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, VpnClientIPsecParametersInner>() { + @Override + public VpnClientIPsecParametersInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The virtual network gateway name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> getVpnclientIpsecParametersWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + Observable> observable = service.getVpnclientIpsecParameters(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The virtual network gateway name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VpnClientIPsecParametersInner object if successful. + */ + public VpnClientIPsecParametersInner beginGetVpnclientIpsecParameters(String resourceGroupName, String virtualNetworkGatewayName) { + return beginGetVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().single().body(); + } + + /** + * The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The virtual network gateway name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginGetVpnclientIpsecParametersAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginGetVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); + } + + /** + * The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The virtual network gateway name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnClientIPsecParametersInner object + */ + public Observable beginGetVpnclientIpsecParametersAsync(String resourceGroupName, String virtualNetworkGatewayName) { + return beginGetVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, VpnClientIPsecParametersInner>() { + @Override + public VpnClientIPsecParametersInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The virtual network gateway name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnClientIPsecParametersInner object + */ + public Observable> beginGetVpnclientIpsecParametersWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + return service.beginGetVpnclientIpsecParameters(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginGetVpnclientIpsecParametersDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginGetVpnclientIpsecParametersDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a xml format representation for vpn device configuration script. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection for which the configuration script is generated. + * @param parameters Parameters supplied to the generate vpn device script operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the String object if successful. + */ + public String vpnDeviceConfigurationScript(String resourceGroupName, String virtualNetworkGatewayConnectionName, VpnDeviceScriptParameters parameters) { + return vpnDeviceConfigurationScriptWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters).toBlocking().single().body(); + } + + /** + * Gets a xml format representation for vpn device configuration script. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection for which the configuration script is generated. + * @param parameters Parameters supplied to the generate vpn device script operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture vpnDeviceConfigurationScriptAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, VpnDeviceScriptParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(vpnDeviceConfigurationScriptWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters), serviceCallback); + } + + /** + * Gets a xml format representation for vpn device configuration script. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection for which the configuration script is generated. + * @param parameters Parameters supplied to the generate vpn device script operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable vpnDeviceConfigurationScriptAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, VpnDeviceScriptParameters parameters) { + return vpnDeviceConfigurationScriptWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters).map(new Func1, String>() { + @Override + public String call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a xml format representation for vpn device configuration script. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection for which the configuration script is generated. + * @param parameters Parameters supplied to the generate vpn device script operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable> vpnDeviceConfigurationScriptWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, VpnDeviceScriptParameters parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayConnectionName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2018-04-01"; + return service.vpnDeviceConfigurationScript(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = vpnDeviceConfigurationScriptDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse vpnDeviceConfigurationScriptDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** * Gets all virtual network gateways by resource group. * diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkInner.java index d49512c79b0..443595c481f 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkInner.java @@ -11,14 +11,17 @@ import com.microsoft.azure.management.network.AddressSpace; import com.microsoft.azure.management.network.DhcpOptions; import java.util.List; +import com.microsoft.azure.SubResource; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; import com.microsoft.azure.Resource; /** * Virtual Network resource. */ @JsonFlatten +@SkipParentValidation public class VirtualNetworkInner extends Resource { /** * The AddressSpace that contains an array of IP address ranges that can be @@ -59,6 +62,27 @@ public class VirtualNetworkInner extends Resource { @JsonProperty(value = "properties.provisioningState") private String provisioningState; + /** + * Indicates if DDoS protection is enabled for all the protected resources + * in the virtual network. It requires a DDoS protection plan associated + * with the resource. + */ + @JsonProperty(value = "properties.enableDdosProtection") + private Boolean enableDdosProtection; + + /** + * Indicates if VM protection is enabled for all the subnets in the virtual + * network. + */ + @JsonProperty(value = "properties.enableVmProtection") + private Boolean enableVmProtection; + + /** + * The DDoS protection plan associated with the virtual network. + */ + @JsonProperty(value = "properties.ddosProtectionPlan") + private SubResource ddosProtectionPlan; + /** * Gets a unique read-only string that changes whenever the resource is * updated. @@ -67,7 +91,13 @@ public class VirtualNetworkInner extends Resource { private String etag; /** - * Get the addressSpace value. + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get the AddressSpace that contains an array of IP address ranges that can be used by subnets. * * @return the addressSpace value */ @@ -76,7 +106,7 @@ public AddressSpace addressSpace() { } /** - * Set the addressSpace value. + * Set the AddressSpace that contains an array of IP address ranges that can be used by subnets. * * @param addressSpace the addressSpace value to set * @return the VirtualNetworkInner object itself. @@ -87,7 +117,7 @@ public VirtualNetworkInner withAddressSpace(AddressSpace addressSpace) { } /** - * Get the dhcpOptions value. + * Get the dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network. * * @return the dhcpOptions value */ @@ -96,7 +126,7 @@ public DhcpOptions dhcpOptions() { } /** - * Set the dhcpOptions value. + * Set the dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network. * * @param dhcpOptions the dhcpOptions value to set * @return the VirtualNetworkInner object itself. @@ -107,7 +137,7 @@ public VirtualNetworkInner withDhcpOptions(DhcpOptions dhcpOptions) { } /** - * Get the subnets value. + * Get a list of subnets in a Virtual Network. * * @return the subnets value */ @@ -116,7 +146,7 @@ public List subnets() { } /** - * Set the subnets value. + * Set a list of subnets in a Virtual Network. * * @param subnets the subnets value to set * @return the VirtualNetworkInner object itself. @@ -127,7 +157,7 @@ public VirtualNetworkInner withSubnets(List subnets) { } /** - * Get the virtualNetworkPeerings value. + * Get a list of peerings in a Virtual Network. * * @return the virtualNetworkPeerings value */ @@ -136,7 +166,7 @@ public List virtualNetworkPeerings() { } /** - * Set the virtualNetworkPeerings value. + * Set a list of peerings in a Virtual Network. * * @param virtualNetworkPeerings the virtualNetworkPeerings value to set * @return the VirtualNetworkInner object itself. @@ -147,7 +177,7 @@ public VirtualNetworkInner withVirtualNetworkPeerings(List> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.delete(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -232,7 +232,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -250,8 +250,8 @@ public Observable> call(Response response) { private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -325,7 +325,7 @@ public Observable> getWithServiceRes if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.get(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -424,7 +424,7 @@ public Observable> createOrUpdateWit throw new IllegalArgumentException("Parameter virtualNetworkPeeringParameters is required and cannot be null."); } Validator.validate(virtualNetworkPeeringParameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.createOrUpdate(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, this.client.subscriptionId(), virtualNetworkPeeringParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -506,7 +506,7 @@ public Observable> beginCreateOrUpda throw new IllegalArgumentException("Parameter virtualNetworkPeeringParameters is required and cannot be null."); } Validator.validate(virtualNetworkPeeringParameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, this.client.subscriptionId(), virtualNetworkPeeringParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -628,7 +628,7 @@ public Observable>> listSingleP if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkUsageInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkUsageInner.java index 848fdb914a1..84bd3c1ca96 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkUsageInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkUsageInner.java @@ -46,7 +46,7 @@ public class VirtualNetworkUsageInner { private String unit; /** - * Get the currentValue value. + * Get indicates number of IPs used from the Subnet. * * @return the currentValue value */ @@ -55,7 +55,7 @@ public Double currentValue() { } /** - * Get the id value. + * Get subnet identifier. * * @return the id value */ @@ -64,7 +64,7 @@ public String id() { } /** - * Get the limit value. + * Get indicates the size of the subnet. * * @return the limit value */ @@ -73,7 +73,7 @@ public Double limit() { } /** - * Get the name value. + * Get the name containing common and localized value for usage. * * @return the name value */ @@ -82,7 +82,7 @@ public VirtualNetworkUsageName name() { } /** - * Get the unit value. + * Get usage units. Returns 'Count'. * * @return the unit value */ diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworksInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworksInner.java index 9238bd8bce4..8f7440219f2 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworksInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworksInner.java @@ -16,6 +16,7 @@ import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.network.TagsObject; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -24,12 +25,14 @@ import com.microsoft.rest.Validator; import java.io.IOException; import java.util.List; +import java.util.Map; import okhttp3.ResponseBody; import retrofit2.http.Body; import retrofit2.http.GET; import retrofit2.http.Header; import retrofit2.http.Headers; import retrofit2.http.HTTP; +import retrofit2.http.PATCH; import retrofit2.http.Path; import retrofit2.http.PUT; import retrofit2.http.Query; @@ -84,6 +87,14 @@ interface VirtualNetworksService { @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}") Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkName") String virtualNetworkName, @Path("subscriptionId") String subscriptionId, @Body VirtualNetworkInner 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.network.VirtualNetworks updateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}") + Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkName") String virtualNetworkName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.VirtualNetworks beginUpdateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}") + Observable> beginUpdateTags(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkName") String virtualNetworkName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.VirtualNetworks list" }) @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualNetworks") Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -175,7 +186,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.delete(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -241,7 +252,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -258,9 +269,9 @@ public Observable> call(Response response) { private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) - .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -327,7 +338,7 @@ public Observable> getByResourceGroupWithSe if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; final String expand = null; return service.getByResourceGroup(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -409,7 +420,7 @@ public Observable> getByResourceGroupWithSe if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.getByResourceGroup(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -501,7 +512,7 @@ public Observable> createOrUpdateWithServic throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.createOrUpdate(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -576,7 +587,7 @@ public Observable> beginCreateOrUpdateWithS throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -599,6 +610,320 @@ private ServiceResponse beginCreateOrUpdateDelegate(Respons .build(response); } + /** + * Updates a virtual network tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VirtualNetworkInner object if successful. + */ + public VirtualNetworkInner updateTags(String resourceGroupName, String virtualNetworkName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkName).toBlocking().last().body(); + } + + /** + * Updates a virtual network tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateTagsAsync(String resourceGroupName, String virtualNetworkName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkName), serviceCallback); + } + + /** + * Updates a virtual network tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateTagsAsync(String resourceGroupName, String virtualNetworkName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkName).map(new Func1, VirtualNetworkInner>() { + @Override + public VirtualNetworkInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a virtual network tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + Observable> observable = service.updateTags(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Updates a virtual network tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VirtualNetworkInner object if successful. + */ + public VirtualNetworkInner updateTags(String resourceGroupName, String virtualNetworkName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkName, tags).toBlocking().last().body(); + } + + /** + * Updates a virtual network tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param tags Resource tags. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateTagsAsync(String resourceGroupName, String virtualNetworkName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkName, tags), serviceCallback); + } + + /** + * Updates a virtual network tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateTagsAsync(String resourceGroupName, String virtualNetworkName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkName, tags).map(new Func1, VirtualNetworkInner>() { + @Override + public VirtualNetworkInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a virtual network tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + Observable> observable = service.updateTags(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Updates a virtual network tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VirtualNetworkInner object if successful. + */ + public VirtualNetworkInner beginUpdateTags(String resourceGroupName, String virtualNetworkName) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkName).toBlocking().single().body(); + } + + /** + * Updates a virtual network tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkName), serviceCallback); + } + + /** + * Updates a virtual network tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkInner object + */ + public Observable beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkName) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkName).map(new Func1, VirtualNetworkInner>() { + @Override + public VirtualNetworkInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a virtual network tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkInner object + */ + public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.beginUpdateTags(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates a virtual network tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VirtualNetworkInner object if successful. + */ + public VirtualNetworkInner beginUpdateTags(String resourceGroupName, String virtualNetworkName, Map tags) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkName, tags).toBlocking().single().body(); + } + + /** + * Updates a virtual network tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param tags Resource tags. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkName, tags), serviceCallback); + } + + /** + * Updates a virtual network tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkInner object + */ + public Observable beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkName, Map tags) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkName, tags).map(new Func1, VirtualNetworkInner>() { + @Override + public VirtualNetworkInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a virtual network tags. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkInner object + */ + public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.beginUpdateTags(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateTagsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** * Gets all virtual networks in a subscription. * @@ -682,7 +1007,7 @@ public Observable>> listSinglePageAsyn if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -795,7 +1120,7 @@ public Observable>> listByResourceGrou if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -879,7 +1204,7 @@ public Observable> checkIPAddr if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; final String ipAddress = null; return service.checkIPAddressAvailability(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), ipAddress, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -961,7 +1286,7 @@ public Observable> checkIPAddr if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.checkIPAddressAvailability(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), ipAddress, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1082,7 +1407,7 @@ public Observable>> listUsageSing if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.listUsage(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VpnClientIPsecParametersInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VpnClientIPsecParametersInner.java new file mode 100644 index 00000000000..2987abb7ad4 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VpnClientIPsecParametersInner.java @@ -0,0 +1,242 @@ +/** + * 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.network.implementation; + +import com.microsoft.azure.management.network.IpsecEncryption; +import com.microsoft.azure.management.network.IpsecIntegrity; +import com.microsoft.azure.management.network.IkeEncryption; +import com.microsoft.azure.management.network.IkeIntegrity; +import com.microsoft.azure.management.network.DhGroup; +import com.microsoft.azure.management.network.PfsGroup; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * An IPSec parameters for a virtual network gateway P2S connection. + */ +public class VpnClientIPsecParametersInner { + /** + * The IPSec Security Association (also called Quick Mode or Phase 2 SA) + * lifetime in seconds for P2S client. + */ + @JsonProperty(value = "saLifeTimeSeconds", required = true) + private int saLifeTimeSeconds; + + /** + * The IPSec Security Association (also called Quick Mode or Phase 2 SA) + * payload size in KB for P2S client.. + */ + @JsonProperty(value = "saDataSizeKilobytes", required = true) + private int saDataSizeKilobytes; + + /** + * The IPSec encryption algorithm (IKE phase 1). Possible values include: + * 'None', 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES128', + * 'GCMAES192', 'GCMAES256'. + */ + @JsonProperty(value = "ipsecEncryption", required = true) + private IpsecEncryption ipsecEncryption; + + /** + * The IPSec integrity algorithm (IKE phase 1). Possible values include: + * 'MD5', 'SHA1', 'SHA256', 'GCMAES128', 'GCMAES192', 'GCMAES256'. + */ + @JsonProperty(value = "ipsecIntegrity", required = true) + private IpsecIntegrity ipsecIntegrity; + + /** + * The IKE encryption algorithm (IKE phase 2). Possible values include: + * 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'. + */ + @JsonProperty(value = "ikeEncryption", required = true) + private IkeEncryption ikeEncryption; + + /** + * The IKE integrity algorithm (IKE phase 2). Possible values include: + * 'MD5', 'SHA1', 'SHA256', 'SHA384', 'GCMAES256', 'GCMAES128'. + */ + @JsonProperty(value = "ikeIntegrity", required = true) + private IkeIntegrity ikeIntegrity; + + /** + * The DH Groups used in IKE Phase 1 for initial SA. Possible values + * include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', + * 'ECP256', 'ECP384', 'DHGroup24'. + */ + @JsonProperty(value = "dhGroup", required = true) + private DhGroup dhGroup; + + /** + * The Pfs Groups used in IKE Phase 2 for new child SA. Possible values + * include: 'None', 'PFS1', 'PFS2', 'PFS2048', 'ECP256', 'ECP384', 'PFS24', + * 'PFS14', 'PFSMM'. + */ + @JsonProperty(value = "pfsGroup", required = true) + private PfsGroup pfsGroup; + + /** + * Get the IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for P2S client. + * + * @return the saLifeTimeSeconds value + */ + public int saLifeTimeSeconds() { + return this.saLifeTimeSeconds; + } + + /** + * Set the IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for P2S client. + * + * @param saLifeTimeSeconds the saLifeTimeSeconds value to set + * @return the VpnClientIPsecParametersInner object itself. + */ + public VpnClientIPsecParametersInner withSaLifeTimeSeconds(int saLifeTimeSeconds) { + this.saLifeTimeSeconds = saLifeTimeSeconds; + return this; + } + + /** + * Get the IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for P2S client.. + * + * @return the saDataSizeKilobytes value + */ + public int saDataSizeKilobytes() { + return this.saDataSizeKilobytes; + } + + /** + * Set the IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for P2S client.. + * + * @param saDataSizeKilobytes the saDataSizeKilobytes value to set + * @return the VpnClientIPsecParametersInner object itself. + */ + public VpnClientIPsecParametersInner withSaDataSizeKilobytes(int saDataSizeKilobytes) { + this.saDataSizeKilobytes = saDataSizeKilobytes; + return this; + } + + /** + * Get the IPSec encryption algorithm (IKE phase 1). Possible values include: 'None', 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES128', 'GCMAES192', 'GCMAES256'. + * + * @return the ipsecEncryption value + */ + public IpsecEncryption ipsecEncryption() { + return this.ipsecEncryption; + } + + /** + * Set the IPSec encryption algorithm (IKE phase 1). Possible values include: 'None', 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES128', 'GCMAES192', 'GCMAES256'. + * + * @param ipsecEncryption the ipsecEncryption value to set + * @return the VpnClientIPsecParametersInner object itself. + */ + public VpnClientIPsecParametersInner withIpsecEncryption(IpsecEncryption ipsecEncryption) { + this.ipsecEncryption = ipsecEncryption; + return this; + } + + /** + * Get the IPSec integrity algorithm (IKE phase 1). Possible values include: 'MD5', 'SHA1', 'SHA256', 'GCMAES128', 'GCMAES192', 'GCMAES256'. + * + * @return the ipsecIntegrity value + */ + public IpsecIntegrity ipsecIntegrity() { + return this.ipsecIntegrity; + } + + /** + * Set the IPSec integrity algorithm (IKE phase 1). Possible values include: 'MD5', 'SHA1', 'SHA256', 'GCMAES128', 'GCMAES192', 'GCMAES256'. + * + * @param ipsecIntegrity the ipsecIntegrity value to set + * @return the VpnClientIPsecParametersInner object itself. + */ + public VpnClientIPsecParametersInner withIpsecIntegrity(IpsecIntegrity ipsecIntegrity) { + this.ipsecIntegrity = ipsecIntegrity; + return this; + } + + /** + * Get the IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'. + * + * @return the ikeEncryption value + */ + public IkeEncryption ikeEncryption() { + return this.ikeEncryption; + } + + /** + * Set the IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'. + * + * @param ikeEncryption the ikeEncryption value to set + * @return the VpnClientIPsecParametersInner object itself. + */ + public VpnClientIPsecParametersInner withIkeEncryption(IkeEncryption ikeEncryption) { + this.ikeEncryption = ikeEncryption; + return this; + } + + /** + * Get the IKE integrity algorithm (IKE phase 2). Possible values include: 'MD5', 'SHA1', 'SHA256', 'SHA384', 'GCMAES256', 'GCMAES128'. + * + * @return the ikeIntegrity value + */ + public IkeIntegrity ikeIntegrity() { + return this.ikeIntegrity; + } + + /** + * Set the IKE integrity algorithm (IKE phase 2). Possible values include: 'MD5', 'SHA1', 'SHA256', 'SHA384', 'GCMAES256', 'GCMAES128'. + * + * @param ikeIntegrity the ikeIntegrity value to set + * @return the VpnClientIPsecParametersInner object itself. + */ + public VpnClientIPsecParametersInner withIkeIntegrity(IkeIntegrity ikeIntegrity) { + this.ikeIntegrity = ikeIntegrity; + return this; + } + + /** + * Get the DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'. + * + * @return the dhGroup value + */ + public DhGroup dhGroup() { + return this.dhGroup; + } + + /** + * Set the DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'. + * + * @param dhGroup the dhGroup value to set + * @return the VpnClientIPsecParametersInner object itself. + */ + public VpnClientIPsecParametersInner withDhGroup(DhGroup dhGroup) { + this.dhGroup = dhGroup; + return this; + } + + /** + * Get the Pfs Groups used in IKE Phase 2 for new child SA. Possible values include: 'None', 'PFS1', 'PFS2', 'PFS2048', 'ECP256', 'ECP384', 'PFS24', 'PFS14', 'PFSMM'. + * + * @return the pfsGroup value + */ + public PfsGroup pfsGroup() { + return this.pfsGroup; + } + + /** + * Set the Pfs Groups used in IKE Phase 2 for new child SA. Possible values include: 'None', 'PFS1', 'PFS2', 'PFS2048', 'ECP256', 'ECP384', 'PFS24', 'PFS14', 'PFSMM'. + * + * @param pfsGroup the pfsGroup value to set + * @return the VpnClientIPsecParametersInner object itself. + */ + public VpnClientIPsecParametersInner withPfsGroup(PfsGroup pfsGroup) { + this.pfsGroup = pfsGroup; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VpnClientRevokedCertificateInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VpnClientRevokedCertificateInner.java index bb555d4c726..7e4e363a781 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VpnClientRevokedCertificateInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VpnClientRevokedCertificateInner.java @@ -44,7 +44,7 @@ public class VpnClientRevokedCertificateInner extends SubResource { private String etag; /** - * Get the thumbprint value. + * Get the revoked VPN client certificate thumbprint. * * @return the thumbprint value */ @@ -53,7 +53,7 @@ public String thumbprint() { } /** - * Set the thumbprint value. + * Set the revoked VPN client certificate thumbprint. * * @param thumbprint the thumbprint value to set * @return the VpnClientRevokedCertificateInner object itself. @@ -64,7 +64,7 @@ public VpnClientRevokedCertificateInner withThumbprint(String thumbprint) { } /** - * Get the provisioningState value. + * Get the provisioning state of the VPN client revoked certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. * * @return the provisioningState value */ @@ -73,7 +73,7 @@ public String provisioningState() { } /** - * Get the name value. + * Get the name of the resource that is unique within a resource group. This name can be used to access the resource. * * @return the name value */ @@ -82,7 +82,7 @@ public String name() { } /** - * Set the name value. + * Set the name of the resource that is unique within a resource group. This name can be used to access the resource. * * @param name the name value to set * @return the VpnClientRevokedCertificateInner object itself. @@ -93,7 +93,7 @@ public VpnClientRevokedCertificateInner withName(String name) { } /** - * Get the etag value. + * Get a unique read-only string that changes whenever the resource is updated. * * @return the etag value */ @@ -102,7 +102,7 @@ public String etag() { } /** - * Set the etag value. + * Set a unique read-only string that changes whenever the resource is updated. * * @param etag the etag value to set * @return the VpnClientRevokedCertificateInner object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VpnClientRootCertificateInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VpnClientRootCertificateInner.java index e7a48315e59..276e046e381 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VpnClientRootCertificateInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VpnClientRootCertificateInner.java @@ -44,7 +44,7 @@ public class VpnClientRootCertificateInner extends SubResource { private String etag; /** - * Get the publicCertData value. + * Get the certificate public data. * * @return the publicCertData value */ @@ -53,7 +53,7 @@ public String publicCertData() { } /** - * Set the publicCertData value. + * Set the certificate public data. * * @param publicCertData the publicCertData value to set * @return the VpnClientRootCertificateInner object itself. @@ -64,7 +64,7 @@ public VpnClientRootCertificateInner withPublicCertData(String publicCertData) { } /** - * Get the provisioningState value. + * Get the provisioning state of the VPN client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. * * @return the provisioningState value */ @@ -73,7 +73,7 @@ public String provisioningState() { } /** - * Get the name value. + * Get the name of the resource that is unique within a resource group. This name can be used to access the resource. * * @return the name value */ @@ -82,7 +82,7 @@ public String name() { } /** - * Set the name value. + * Set the name of the resource that is unique within a resource group. This name can be used to access the resource. * * @param name the name value to set * @return the VpnClientRootCertificateInner object itself. @@ -93,7 +93,7 @@ public VpnClientRootCertificateInner withName(String name) { } /** - * Get the etag value. + * Get a unique read-only string that changes whenever the resource is updated. * * @return the etag value */ @@ -102,7 +102,7 @@ public String etag() { } /** - * Set the etag value. + * Set a unique read-only string that changes whenever the resource is updated. * * @param etag the etag value to set * @return the VpnClientRootCertificateInner object itself. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VpnDeviceScriptParametersInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VpnDeviceScriptParametersInner.java new file mode 100644 index 00000000000..84f9d8f2cc1 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VpnDeviceScriptParametersInner.java @@ -0,0 +1,95 @@ +/** + * 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.network.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Vpn device configuration script generation parameters. + */ +public class VpnDeviceScriptParametersInner { + /** + * The vendor for the vpn device. + */ + @JsonProperty(value = "vendor") + private String vendor; + + /** + * The device family for the vpn device. + */ + @JsonProperty(value = "deviceFamily") + private String deviceFamily; + + /** + * The firmware version for the vpn device. + */ + @JsonProperty(value = "firmwareVersion") + private String firmwareVersion; + + /** + * Get the vendor value. + * + * @return the vendor value + */ + public String vendor() { + return this.vendor; + } + + /** + * Set the vendor value. + * + * @param vendor the vendor value to set + * @return the VpnDeviceScriptParametersInner object itself. + */ + public VpnDeviceScriptParametersInner withVendor(String vendor) { + this.vendor = vendor; + return this; + } + + /** + * Get the deviceFamily value. + * + * @return the deviceFamily value + */ + public String deviceFamily() { + return this.deviceFamily; + } + + /** + * Set the deviceFamily value. + * + * @param deviceFamily the deviceFamily value to set + * @return the VpnDeviceScriptParametersInner object itself. + */ + public VpnDeviceScriptParametersInner withDeviceFamily(String deviceFamily) { + this.deviceFamily = deviceFamily; + return this; + } + + /** + * Get the firmwareVersion value. + * + * @return the firmwareVersion value + */ + public String firmwareVersion() { + return this.firmwareVersion; + } + + /** + * Set the firmwareVersion value. + * + * @param firmwareVersion the firmwareVersion value to set + * @return the VpnDeviceScriptParametersInner object itself. + */ + public VpnDeviceScriptParametersInner withFirmwareVersion(String firmwareVersion) { + this.firmwareVersion = firmwareVersion; + return this; + } + +}