Skip to content
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 d3745401b16f67028c967b1369eca7632905882b
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,19 @@
class NetworkConfigurationDiagnosticParameters(Model):
"""Parameters to get network configuration diagnostic.

Variables are only populated by the server, and will be ignored when
sending a request.

All required parameters must be populated in order to send to Azure.

:param target_resource_id: Required. The ID of the target resource to
perform network configuration diagnostic. Valid options are VM,
NetworkInterface, VMSS/NetworkInterface and Application Gateway.
:type target_resource_id: str
:ivar queries: Required. List of traffic queries.
:vartype queries:
list[~azure.mgmt.network.v2018_06_01.models.TrafficQuery]
:param queries: Required. List of traffic queries.
:type queries: list[~azure.mgmt.network.v2018_06_01.models.TrafficQuery]
"""

_validation = {
'target_resource_id': {'required': True},
'queries': {'required': True, 'readonly': True},
'queries': {'required': True},
}

_attribute_map = {
Expand All @@ -42,4 +38,4 @@ class NetworkConfigurationDiagnosticParameters(Model):
def __init__(self, **kwargs):
super(NetworkConfigurationDiagnosticParameters, self).__init__(**kwargs)
self.target_resource_id = kwargs.get('target_resource_id', None)
self.queries = None
self.queries = kwargs.get('queries', None)
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,27 @@
class NetworkConfigurationDiagnosticParameters(Model):
"""Parameters to get network configuration diagnostic.

Variables are only populated by the server, and will be ignored when
sending a request.

All required parameters must be populated in order to send to Azure.

:param target_resource_id: Required. The ID of the target resource to
perform network configuration diagnostic. Valid options are VM,
NetworkInterface, VMSS/NetworkInterface and Application Gateway.
:type target_resource_id: str
:ivar queries: Required. List of traffic queries.
:vartype queries:
list[~azure.mgmt.network.v2018_06_01.models.TrafficQuery]
:param queries: Required. List of traffic queries.
:type queries: list[~azure.mgmt.network.v2018_06_01.models.TrafficQuery]
"""

_validation = {
'target_resource_id': {'required': True},
'queries': {'required': True, 'readonly': True},
'queries': {'required': True},
}

_attribute_map = {
'target_resource_id': {'key': 'targetResourceId', 'type': 'str'},
'queries': {'key': 'queries', 'type': '[TrafficQuery]'},
}

def __init__(self, *, target_resource_id: str, **kwargs) -> None:
def __init__(self, *, target_resource_id: str, queries, **kwargs) -> None:
super(NetworkConfigurationDiagnosticParameters, self).__init__(**kwargs)
self.target_resource_id = target_resource_id
self.queries = None
self.queries = queries
Original file line number Diff line number Diff line change
Expand Up @@ -1580,8 +1580,8 @@ def get_long_running_output(response):


def _get_network_configuration_diagnostic_initial(
self, resource_group_name, network_watcher_name, target_resource_id, custom_headers=None, raw=False, **operation_config):
parameters = models.NetworkConfigurationDiagnosticParameters(target_resource_id=target_resource_id)
self, resource_group_name, network_watcher_name, target_resource_id, queries, custom_headers=None, raw=False, **operation_config):
parameters = models.NetworkConfigurationDiagnosticParameters(target_resource_id=target_resource_id, queries=queries)

# Construct URL
url = self.get_network_configuration_diagnostic.metadata['url']
Expand Down Expand Up @@ -1633,7 +1633,7 @@ def _get_network_configuration_diagnostic_initial(
return deserialized

def get_network_configuration_diagnostic(
self, resource_group_name, network_watcher_name, target_resource_id, custom_headers=None, raw=False, polling=True, **operation_config):
self, resource_group_name, network_watcher_name, target_resource_id, queries, custom_headers=None, raw=False, polling=True, **operation_config):
"""Get network configuration diagnostic.

:param resource_group_name: The name of the resource group.
Expand All @@ -1644,6 +1644,9 @@ def get_network_configuration_diagnostic(
network configuration diagnostic. Valid options are VM,
NetworkInterface, VMSS/NetworkInterface and Application Gateway.
:type target_resource_id: str
:param queries: List of traffic queries.
:type queries:
list[~azure.mgmt.network.v2018_06_01.models.TrafficQuery]
:param dict custom_headers: headers that will be added to the request
:param bool raw: The poller return type is ClientRawResponse, the
direct response alongside the deserialized response
Expand All @@ -1662,6 +1665,7 @@ def get_network_configuration_diagnostic(
resource_group_name=resource_group_name,
network_watcher_name=network_watcher_name,
target_resource_id=target_resource_id,
queries=queries,
custom_headers=custom_headers,
raw=True,
**operation_config
Expand Down