Skip to content

Commit

Permalink
[AutoPR network/resource-manager] Added NetworkConfigurationDiagnosti…
Browse files Browse the repository at this point in the history
…c rest API + example (#2305)

* Generated from 6ad7c8a080cf905ffcbe9c42c0382059ce753188

Added NetworkConfigurationDiagnostic rest API + example

* Generated from 6909b52c5e23056444d410930b8702e7540811e2

Removed 'read-only' from queries in NetworkConfigurationDiagnostic API

* Generated from f12e6b41326c05506097b75dce076c297074a3d2

Fixed example name

* Generated from 9e5daf5f1cd3c59140eec06d6fb55e6456323c54

Fixed reference to ErrorDetails

* Generated from 0858a238c818aa119584a9d61deddc2a26494de9

Fixed response for QueryConnectionMonitors API + fixed example

* Generated from 377e5cc3f8f10f71d7816d78462fbb68685453bd

Fixed types for latencies in networkwatcher.json
  • Loading branch information
AutorestCI authored Aug 15, 2018
1 parent 191f4cb commit 1768cae
Show file tree
Hide file tree
Showing 22 changed files with 2,281 additions and 142 deletions.
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

0 comments on commit 1768cae

Please sign in to comment.