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 all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/**
* 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.ConnectionMonitorsQueryResultItemInner;
import com.microsoft.azure.management.network.v2018_06_01.implementation.ConnectionMonitorQueryResultInner;

/**
* Type representing ConnectionMonitorsQueryResultItem.
*/
public interface ConnectionMonitorsQueryResultItem extends HasInner<ConnectionMonitorsQueryResultItemInner>, HasManager<NetworkManager> {
/**
* @return the report value.
*/
ConnectionMonitorQueryResultInner report();

/**
* @return the resourceId value.
*/
String resourceId();

}
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,36 @@ public class ConnectionStateSnapshot {
@JsonProperty(value = "evaluationState")
private EvaluationState evaluationState;

/**
* Average latency in ms.
*/
@JsonProperty(value = "avgLatencyInMs")
private Integer avgLatencyInMs;

/**
* Minimum latency in ms.
*/
@JsonProperty(value = "minLatencyInMs")
private Integer minLatencyInMs;

/**
* Maximum latency in ms.
*/
@JsonProperty(value = "maxLatencyInMs")
private Integer maxLatencyInMs;

/**
* The number of sent probes.
*/
@JsonProperty(value = "probesSent")
private Integer probesSent;

/**
* The number of failed probes.
*/
@JsonProperty(value = "probesFailed")
private Integer probesFailed;

/**
* List of hops between the source and the destination.
*/
Expand Down Expand Up @@ -128,6 +158,106 @@ public ConnectionStateSnapshot withEvaluationState(EvaluationState evaluationSta
return this;
}

/**
* Get average latency in ms.
*
* @return the avgLatencyInMs value
*/
public Integer avgLatencyInMs() {
return this.avgLatencyInMs;
}

/**
* Set average latency in ms.
*
* @param avgLatencyInMs the avgLatencyInMs value to set
* @return the ConnectionStateSnapshot object itself.
*/
public ConnectionStateSnapshot withAvgLatencyInMs(Integer avgLatencyInMs) {
this.avgLatencyInMs = avgLatencyInMs;
return this;
}

/**
* Get minimum latency in ms.
*
* @return the minLatencyInMs value
*/
public Integer minLatencyInMs() {
return this.minLatencyInMs;
}

/**
* Set minimum latency in ms.
*
* @param minLatencyInMs the minLatencyInMs value to set
* @return the ConnectionStateSnapshot object itself.
*/
public ConnectionStateSnapshot withMinLatencyInMs(Integer minLatencyInMs) {
this.minLatencyInMs = minLatencyInMs;
return this;
}

/**
* Get maximum latency in ms.
*
* @return the maxLatencyInMs value
*/
public Integer maxLatencyInMs() {
return this.maxLatencyInMs;
}

/**
* Set maximum latency in ms.
*
* @param maxLatencyInMs the maxLatencyInMs value to set
* @return the ConnectionStateSnapshot object itself.
*/
public ConnectionStateSnapshot withMaxLatencyInMs(Integer maxLatencyInMs) {
this.maxLatencyInMs = maxLatencyInMs;
return this;
}

/**
* Get the number of sent probes.
*
* @return the probesSent value
*/
public Integer probesSent() {
return this.probesSent;
}

/**
* Set the number of sent probes.
*
* @param probesSent the probesSent value to set
* @return the ConnectionStateSnapshot object itself.
*/
public ConnectionStateSnapshot withProbesSent(Integer probesSent) {
this.probesSent = probesSent;
return this;
}

/**
* Get the number of failed probes.
*
* @return the probesFailed value
*/
public Integer probesFailed() {
return this.probesFailed;
}

/**
* Set the number of failed probes.
*
* @param probesFailed the probesFailed value to set
* @return the ConnectionStateSnapshot object itself.
*/
public ConnectionStateSnapshot withProbesFailed(Integer probesFailed) {
this.probesFailed = probesFailed;
return this;
}

/**
* Get list of hops between the source and the destination.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -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.v2018_06_01;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* The error object.
*/
public class ErrorResponse {
/**
* Error.
*/
@JsonProperty(value = "error")
private ErrorDetails error;

/**
* Get the error value.
*
* @return the error value
*/
public ErrorDetails error() {
return this.error;
}

/**
* Set the error value.
*
* @param error the error value to set
* @return the ErrorResponse object itself.
*/
public ErrorResponse withError(ErrorDetails error) {
this.error = error;
return this;
}

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

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

import com.microsoft.rest.RestException;
import okhttp3.ResponseBody;
import retrofit2.Response;

/**
* Exception thrown for an invalid response with ErrorResponse information.
*/
public class ErrorResponseException extends RestException {
/**
* Initializes a new instance of the ErrorResponseException class.
*
* @param message the exception message or the response content if a message is not available
* @param response the HTTP response
*/
public ErrorResponseException(final String message, final Response<ResponseBody> response) {
super(message, response);
}

/**
* Initializes a new instance of the ErrorResponseException class.
*
* @param message the exception message or the response content if a message is not available
* @param response the HTTP response
* @param body the deserialized response body
*/
public ErrorResponseException(final String message, final Response<ResponseBody> response, final ErrorResponse body) {
super(message, response, body);
}

@Override
public ErrorResponse body() {
return (ErrorResponse) super.body();
}
}
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;
}

}
Loading