Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR network/resource-manager] Added NetworkConfigurationDiagnostic rest API + example #2305

Merged
merged 6 commits into from
Aug 15, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Generated from 6ad7c8a080cf905ffcbe9c42c0382059ce753188
Added NetworkConfigurationDiagnostic rest API + example
  • Loading branch information
AutorestCI committed Aug 7, 2018
commit c8124bd297f99eb350f057580e17224eb15c6212
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
/**
* 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.v2018_06_01;

import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* Results of network security group evaluation.
*/
public class EvaluatedNetworkSecurityGroup {
/**
* Network security group ID.
*/
@JsonProperty(value = "networkSecurityGroupId")
private String networkSecurityGroupId;

/**
* The matchedRule property.
*/
@JsonProperty(value = "matchedRule")
private MatchedRule matchedRule;

/**
* List of network security rules evaluation results.
*/
@JsonProperty(value = "rulesEvaluationResult", access = JsonProperty.Access.WRITE_ONLY)
private List<NetworkSecurityRulesEvaluationResult> rulesEvaluationResult;

/**
* Get network security group ID.
*
* @return the networkSecurityGroupId value
*/
public String networkSecurityGroupId() {
return this.networkSecurityGroupId;
}

/**
* Set network security group ID.
*
* @param networkSecurityGroupId the networkSecurityGroupId value to set
* @return the EvaluatedNetworkSecurityGroup object itself.
*/
public EvaluatedNetworkSecurityGroup withNetworkSecurityGroupId(String networkSecurityGroupId) {
this.networkSecurityGroupId = networkSecurityGroupId;
return this;
}

/**
* Get the matchedRule value.
*
* @return the matchedRule value
*/
public MatchedRule matchedRule() {
return this.matchedRule;
}

/**
* Set the matchedRule value.
*
* @param matchedRule the matchedRule value to set
* @return the EvaluatedNetworkSecurityGroup object itself.
*/
public EvaluatedNetworkSecurityGroup withMatchedRule(MatchedRule matchedRule) {
this.matchedRule = matchedRule;
return this;
}

/**
* Get list of network security rules evaluation results.
*
* @return the rulesEvaluationResult value
*/
public List<NetworkSecurityRulesEvaluationResult> rulesEvaluationResult() {
return this.rulesEvaluationResult;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.network.v2018_06_01;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* Matched rule.
*/
public class MatchedRule {
/**
* Name of the matched network security rule.
*/
@JsonProperty(value = "ruleName")
private String ruleName;

/**
* The network traffic is allowed or denied. Possible values are 'Allow'
* and 'Deny'.
*/
@JsonProperty(value = "action")
private String action;

/**
* Get name of the matched network security rule.
*
* @return the ruleName value
*/
public String ruleName() {
return this.ruleName;
}

/**
* Set name of the matched network security rule.
*
* @param ruleName the ruleName value to set
* @return the MatchedRule object itself.
*/
public MatchedRule withRuleName(String ruleName) {
this.ruleName = ruleName;
return this;
}

/**
* Get the network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'.
*
* @return the action value
*/
public String action() {
return this.action;
}

/**
* Set the network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'.
*
* @param action the action value to set
* @return the MatchedRule object itself.
*/
public MatchedRule withAction(String action) {
this.action = action;
return this;
}

}
Original file line number Diff line number Diff line change
@@ -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.v2018_06_01;

import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* Parameters to get network configuration diagnostic.
*/
public class NetworkConfigurationDiagnosticParameters {
/**
* The ID of the target resource to perform network configuration
* diagnostic. Valid options are VM, NetworkInterface,
* VMSS/NetworkInterface and Application Gateway.
*/
@JsonProperty(value = "targetResourceId", required = true)
private String targetResourceId;

/**
* List of traffic queries.
*/
@JsonProperty(value = "queries", required = true, access = JsonProperty.Access.WRITE_ONLY)
private List<TrafficQuery> queries;

/**
* Get the ID of the target resource to perform network configuration diagnostic. Valid options are VM, NetworkInterface, VMSS/NetworkInterface and Application Gateway.
*
* @return the targetResourceId value
*/
public String targetResourceId() {
return this.targetResourceId;
}

/**
* Set the ID of the target resource to perform network configuration diagnostic. Valid options are VM, NetworkInterface, VMSS/NetworkInterface and Application Gateway.
*
* @param targetResourceId the targetResourceId value to set
* @return the NetworkConfigurationDiagnosticParameters object itself.
*/
public NetworkConfigurationDiagnosticParameters withTargetResourceId(String targetResourceId) {
this.targetResourceId = targetResourceId;
return this;
}

/**
* Get list of traffic queries.
*
* @return the queries value
*/
public List<TrafficQuery> queries() {
return this.queries;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/**
* 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.v2018_06_01;

import com.microsoft.azure.arm.model.HasInner;
import com.microsoft.azure.arm.resources.models.HasManager;
import com.microsoft.azure.management.network.v2018_06_01.implementation.NetworkManager;
import com.microsoft.azure.management.network.v2018_06_01.implementation.NetworkConfigurationDiagnosticResponseInner;
import java.util.List;

/**
* Type representing NetworkConfigurationDiagnosticResponse.
*/
public interface NetworkConfigurationDiagnosticResponse extends HasInner<NetworkConfigurationDiagnosticResponseInner>, HasManager<NetworkManager> {
/**
* @return the results value.
*/
List<NetworkConfigurationDiagnosticResult> results();

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.network.v2018_06_01;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* Network configuration diagnostic result corresponded to provided traffic
* query.
*/
public class NetworkConfigurationDiagnosticResult {
/**
* The trafficQuery property.
*/
@JsonProperty(value = "trafficQuery")
private TrafficQuery trafficQuery;

/**
* The networkSecurityGroupResult property.
*/
@JsonProperty(value = "networkSecurityGroupResult")
private NetworkSecurityGroupResult networkSecurityGroupResult;

/**
* Get the trafficQuery value.
*
* @return the trafficQuery value
*/
public TrafficQuery trafficQuery() {
return this.trafficQuery;
}

/**
* Set the trafficQuery value.
*
* @param trafficQuery the trafficQuery value to set
* @return the NetworkConfigurationDiagnosticResult object itself.
*/
public NetworkConfigurationDiagnosticResult withTrafficQuery(TrafficQuery trafficQuery) {
this.trafficQuery = trafficQuery;
return this;
}

/**
* Get the networkSecurityGroupResult value.
*
* @return the networkSecurityGroupResult value
*/
public NetworkSecurityGroupResult networkSecurityGroupResult() {
return this.networkSecurityGroupResult;
}

/**
* Set the networkSecurityGroupResult value.
*
* @param networkSecurityGroupResult the networkSecurityGroupResult value to set
* @return the NetworkConfigurationDiagnosticResult object itself.
*/
public NetworkConfigurationDiagnosticResult withNetworkSecurityGroupResult(NetworkSecurityGroupResult networkSecurityGroupResult) {
this.networkSecurityGroupResult = networkSecurityGroupResult;
return this;
}

}
Original file line number Diff line number Diff line change
@@ -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.v2018_06_01;

import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* Network configuration diagnostic result corresponded provided traffic query.
*/
public class NetworkSecurityGroupResult {
/**
* The network traffic is allowed or denied. Possible values are 'Allow'
* and 'Deny'. Possible values include: 'Allow', 'Deny'.
*/
@JsonProperty(value = "securityRuleAccessResult")
private SecurityRuleAccess securityRuleAccessResult;

/**
* List of results network security groups diagnostic.
*/
@JsonProperty(value = "evaluatedNetworkSecurityGroups", access = JsonProperty.Access.WRITE_ONLY)
private List<EvaluatedNetworkSecurityGroup> evaluatedNetworkSecurityGroups;

/**
* Get the network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'. Possible values include: 'Allow', 'Deny'.
*
* @return the securityRuleAccessResult value
*/
public SecurityRuleAccess securityRuleAccessResult() {
return this.securityRuleAccessResult;
}

/**
* Set the network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'. Possible values include: 'Allow', 'Deny'.
*
* @param securityRuleAccessResult the securityRuleAccessResult value to set
* @return the NetworkSecurityGroupResult object itself.
*/
public NetworkSecurityGroupResult withSecurityRuleAccessResult(SecurityRuleAccess securityRuleAccessResult) {
this.securityRuleAccessResult = securityRuleAccessResult;
return this;
}

/**
* Get list of results network security groups diagnostic.
*
* @return the evaluatedNetworkSecurityGroups value
*/
public List<EvaluatedNetworkSecurityGroup> evaluatedNetworkSecurityGroups() {
return this.evaluatedNetworkSecurityGroups;
}

}
Loading