Skip to content

Commit

Permalink
Generated from c90c5d14e7b0b169a8cde763860d15aa48a0d37c (#3395)
Browse files Browse the repository at this point in the history
address the comments
  • Loading branch information
AutorestCI authored Sep 21, 2018
1 parent 3be15a4 commit 1d27e71
Show file tree
Hide file tree
Showing 5 changed files with 132 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
from .application_gateway_redirect_configuration_py3 import ApplicationGatewayRedirectConfiguration
from .application_gateway_url_path_map_py3 import ApplicationGatewayUrlPathMap
from .application_gateway_firewall_disabled_rule_group_py3 import ApplicationGatewayFirewallDisabledRuleGroup
from .application_gateway_firewall_exclusion_py3 import ApplicationGatewayFirewallExclusion
from .application_gateway_web_application_firewall_configuration_py3 import ApplicationGatewayWebApplicationFirewallConfiguration
from .application_gateway_autoscale_configuration_py3 import ApplicationGatewayAutoscaleConfiguration
from .application_gateway_py3 import ApplicationGateway
Expand Down Expand Up @@ -330,6 +331,7 @@
from .application_gateway_redirect_configuration import ApplicationGatewayRedirectConfiguration
from .application_gateway_url_path_map import ApplicationGatewayUrlPathMap
from .application_gateway_firewall_disabled_rule_group import ApplicationGatewayFirewallDisabledRuleGroup
from .application_gateway_firewall_exclusion import ApplicationGatewayFirewallExclusion
from .application_gateway_web_application_firewall_configuration import ApplicationGatewayWebApplicationFirewallConfiguration
from .application_gateway_autoscale_configuration import ApplicationGatewayAutoscaleConfiguration
from .application_gateway import ApplicationGateway
Expand Down Expand Up @@ -743,6 +745,7 @@
'ApplicationGatewayRedirectConfiguration',
'ApplicationGatewayUrlPathMap',
'ApplicationGatewayFirewallDisabledRuleGroup',
'ApplicationGatewayFirewallExclusion',
'ApplicationGatewayWebApplicationFirewallConfiguration',
'ApplicationGatewayAutoscaleConfiguration',
'ApplicationGateway',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# coding=utf-8
# --------------------------------------------------------------------------
# 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.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class ApplicationGatewayFirewallExclusion(Model):
"""Allow to exclude some variable satisfy the condition for the WAF check.
All required parameters must be populated in order to send to Azure.
:param match_variable: Required. The variable to be excluded.
:type match_variable: str
:param selector_match_operator: Required. When matchVariable is a
collection, operate on the selector to specify which elements in the
collection this exclusion applies to.
:type selector_match_operator: str
:param selector: Required. When matchVariable is a collection, operator
used to specify which elements in the collection this exclusion applies
to.
:type selector: str
"""

_validation = {
'match_variable': {'required': True},
'selector_match_operator': {'required': True},
'selector': {'required': True},
}

_attribute_map = {
'match_variable': {'key': 'matchVariable', 'type': 'str'},
'selector_match_operator': {'key': 'selectorMatchOperator', 'type': 'str'},
'selector': {'key': 'selector', 'type': 'str'},
}

def __init__(self, **kwargs):
super(ApplicationGatewayFirewallExclusion, self).__init__(**kwargs)
self.match_variable = kwargs.get('match_variable', None)
self.selector_match_operator = kwargs.get('selector_match_operator', None)
self.selector = kwargs.get('selector', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# coding=utf-8
# --------------------------------------------------------------------------
# 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.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class ApplicationGatewayFirewallExclusion(Model):
"""Allow to exclude some variable satisfy the condition for the WAF check.
All required parameters must be populated in order to send to Azure.
:param match_variable: Required. The variable to be excluded.
:type match_variable: str
:param selector_match_operator: Required. When matchVariable is a
collection, operate on the selector to specify which elements in the
collection this exclusion applies to.
:type selector_match_operator: str
:param selector: Required. When matchVariable is a collection, operator
used to specify which elements in the collection this exclusion applies
to.
:type selector: str
"""

_validation = {
'match_variable': {'required': True},
'selector_match_operator': {'required': True},
'selector': {'required': True},
}

_attribute_map = {
'match_variable': {'key': 'matchVariable', 'type': 'str'},
'selector_match_operator': {'key': 'selectorMatchOperator', 'type': 'str'},
'selector': {'key': 'selector', 'type': 'str'},
}

def __init__(self, *, match_variable: str, selector_match_operator: str, selector: str, **kwargs) -> None:
super(ApplicationGatewayFirewallExclusion, self).__init__(**kwargs)
self.match_variable = match_variable
self.selector_match_operator = selector_match_operator
self.selector = selector
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ class ApplicationGatewayWebApplicationFirewallConfiguration(Model):
:type request_body_check: bool
:param max_request_body_size: Maxium request body size for WAF.
:type max_request_body_size: int
:param max_request_body_size_in_kb: Maxium request body size in Kb for
WAF.
:type max_request_body_size_in_kb: int
:param file_upload_limit_in_mb: Maxium file upload size in Mb for WAF.
:type file_upload_limit_in_mb: int
:param exclusions: The exclusion list.
:type exclusions:
list[~azure.mgmt.network.v2018_08_01.models.ApplicationGatewayFirewallExclusion]
"""

_validation = {
Expand All @@ -44,6 +52,8 @@ class ApplicationGatewayWebApplicationFirewallConfiguration(Model):
'rule_set_type': {'required': True},
'rule_set_version': {'required': True},
'max_request_body_size': {'maximum': 128, 'minimum': 8},
'max_request_body_size_in_kb': {'maximum': 128, 'minimum': 8},
'file_upload_limit_in_mb': {'maximum': 500, 'minimum': 0},
}

_attribute_map = {
Expand All @@ -54,6 +64,9 @@ class ApplicationGatewayWebApplicationFirewallConfiguration(Model):
'disabled_rule_groups': {'key': 'disabledRuleGroups', 'type': '[ApplicationGatewayFirewallDisabledRuleGroup]'},
'request_body_check': {'key': 'requestBodyCheck', 'type': 'bool'},
'max_request_body_size': {'key': 'maxRequestBodySize', 'type': 'int'},
'max_request_body_size_in_kb': {'key': 'maxRequestBodySizeInKb', 'type': 'int'},
'file_upload_limit_in_mb': {'key': 'fileUploadLimitInMb', 'type': 'int'},
'exclusions': {'key': 'exclusions', 'type': '[ApplicationGatewayFirewallExclusion]'},
}

def __init__(self, **kwargs):
Expand All @@ -65,3 +78,6 @@ def __init__(self, **kwargs):
self.disabled_rule_groups = kwargs.get('disabled_rule_groups', None)
self.request_body_check = kwargs.get('request_body_check', None)
self.max_request_body_size = kwargs.get('max_request_body_size', None)
self.max_request_body_size_in_kb = kwargs.get('max_request_body_size_in_kb', None)
self.file_upload_limit_in_mb = kwargs.get('file_upload_limit_in_mb', None)
self.exclusions = kwargs.get('exclusions', None)
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ class ApplicationGatewayWebApplicationFirewallConfiguration(Model):
:type request_body_check: bool
:param max_request_body_size: Maxium request body size for WAF.
:type max_request_body_size: int
:param max_request_body_size_in_kb: Maxium request body size in Kb for
WAF.
:type max_request_body_size_in_kb: int
:param file_upload_limit_in_mb: Maxium file upload size in Mb for WAF.
:type file_upload_limit_in_mb: int
:param exclusions: The exclusion list.
:type exclusions:
list[~azure.mgmt.network.v2018_08_01.models.ApplicationGatewayFirewallExclusion]
"""

_validation = {
Expand All @@ -44,6 +52,8 @@ class ApplicationGatewayWebApplicationFirewallConfiguration(Model):
'rule_set_type': {'required': True},
'rule_set_version': {'required': True},
'max_request_body_size': {'maximum': 128, 'minimum': 8},
'max_request_body_size_in_kb': {'maximum': 128, 'minimum': 8},
'file_upload_limit_in_mb': {'maximum': 500, 'minimum': 0},
}

_attribute_map = {
Expand All @@ -54,9 +64,12 @@ class ApplicationGatewayWebApplicationFirewallConfiguration(Model):
'disabled_rule_groups': {'key': 'disabledRuleGroups', 'type': '[ApplicationGatewayFirewallDisabledRuleGroup]'},
'request_body_check': {'key': 'requestBodyCheck', 'type': 'bool'},
'max_request_body_size': {'key': 'maxRequestBodySize', 'type': 'int'},
'max_request_body_size_in_kb': {'key': 'maxRequestBodySizeInKb', 'type': 'int'},
'file_upload_limit_in_mb': {'key': 'fileUploadLimitInMb', 'type': 'int'},
'exclusions': {'key': 'exclusions', 'type': '[ApplicationGatewayFirewallExclusion]'},
}

def __init__(self, *, enabled: bool, firewall_mode, rule_set_type: str, rule_set_version: str, disabled_rule_groups=None, request_body_check: bool=None, max_request_body_size: int=None, **kwargs) -> None:
def __init__(self, *, enabled: bool, firewall_mode, rule_set_type: str, rule_set_version: str, disabled_rule_groups=None, request_body_check: bool=None, max_request_body_size: int=None, max_request_body_size_in_kb: int=None, file_upload_limit_in_mb: int=None, exclusions=None, **kwargs) -> None:
super(ApplicationGatewayWebApplicationFirewallConfiguration, self).__init__(**kwargs)
self.enabled = enabled
self.firewall_mode = firewall_mode
Expand All @@ -65,3 +78,6 @@ def __init__(self, *, enabled: bool, firewall_mode, rule_set_type: str, rule_set
self.disabled_rule_groups = disabled_rule_groups
self.request_body_check = request_body_check
self.max_request_body_size = max_request_body_size
self.max_request_body_size_in_kb = max_request_body_size_in_kb
self.file_upload_limit_in_mb = file_upload_limit_in_mb
self.exclusions = exclusions

0 comments on commit 1d27e71

Please sign in to comment.