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
Prev Previous commit
Next Next commit
Generated from 6909b52c5e23056444d410930b8702e7540811e2
Removed 'read-only' from queries in NetworkConfigurationDiagnostic API
  • Loading branch information
AutorestCI committed Aug 7, 2018
commit a185c0d93834bbc6a23d14b76718dcb472f17b45
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class NetworkConfigurationDiagnosticParameters {
/**
* List of traffic queries.
*/
@JsonProperty(value = "queries", required = true, access = JsonProperty.Access.WRITE_ONLY)
@JsonProperty(value = "queries", required = true)
private List<TrafficQuery> queries;

/**
Expand Down Expand Up @@ -58,4 +58,15 @@ public List<TrafficQuery> queries() {
return this.queries;
}

/**
* Set list of traffic queries.
*
* @param queries the queries value to set
* @return the NetworkConfigurationDiagnosticParameters object itself.
*/
public NetworkConfigurationDiagnosticParameters withQueries(List<TrafficQuery> queries) {
this.queries = queries;
return this;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,10 @@ public interface NetworkWatchers extends SupportsCreating<NetworkWatcher.Definit
*
* @param resourceGroupName The name of the resource group.
* @param networkWatcherName The name of the network watcher.
* @param targetResourceId The ID of the target resource to perform network configuration diagnostic. Valid options are VM, NetworkInterface, VMSS/NetworkInterface and Application Gateway.
* @param parameters Parameters to get network configuration diagnostic.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
Observable<NetworkConfigurationDiagnosticResponse> getNetworkConfigurationDiagnosticAsync(String resourceGroupName, String networkWatcherName, String targetResourceId);
Observable<NetworkConfigurationDiagnosticResponse> getNetworkConfigurationDiagnosticAsync(String resourceGroupName, String networkWatcherName, NetworkConfigurationDiagnosticParameters parameters);

}
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import com.microsoft.azure.management.network.v2018_06_01.ConnectivityParameters;
import com.microsoft.azure.management.network.v2018_06_01.AzureReachabilityReportParameters;
import com.microsoft.azure.management.network.v2018_06_01.AvailableProvidersListParameters;
import com.microsoft.azure.management.network.v2018_06_01.NetworkConfigurationDiagnosticParameters;

class NetworkWatchersImpl extends GroupableResourcesCoreImpl<NetworkWatcher, NetworkWatcherImpl, NetworkWatcherInner, NetworkWatchersInner, NetworkManager> implements NetworkWatchers {
protected NetworkWatchersImpl(NetworkManager manager) {
Expand Down Expand Up @@ -275,9 +276,9 @@ public AvailableProvidersList call(AvailableProvidersListInner inner) {
}

@Override
public Observable<NetworkConfigurationDiagnosticResponse> getNetworkConfigurationDiagnosticAsync(String resourceGroupName, String networkWatcherName, String targetResourceId) {
public Observable<NetworkConfigurationDiagnosticResponse> getNetworkConfigurationDiagnosticAsync(String resourceGroupName, String networkWatcherName, NetworkConfigurationDiagnosticParameters parameters) {
NetworkWatchersInner client = this.inner();
return client.getNetworkConfigurationDiagnosticAsync(resourceGroupName, networkWatcherName, targetResourceId)
return client.getNetworkConfigurationDiagnosticAsync(resourceGroupName, networkWatcherName, parameters)
.map(new Func1<NetworkConfigurationDiagnosticResponseInner, NetworkConfigurationDiagnosticResponse>() {
@Override
public NetworkConfigurationDiagnosticResponse call(NetworkConfigurationDiagnosticResponseInner inner) {
Expand Down
Loading