text: # 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 CorsRule(Model):
      """CORS is an HTTP feature that enables a web application running under one
      domain to access resources in another domain. Web browsers implement a
      security restriction known as same-origin policy that prevents a web page
      from calling APIs in a different domain; CORS provides a secure way to
      allow one domain (the origin domain) to call APIs in another domain.
  
      All required parameters must be populated in order to send to Azure.
  
      :param allowed_origins: Required. The origin domains that are permitted to
       make a request against the storage service via CORS. The origin domain is
       the domain from which the request originates. Note that the origin must be
       an exact case-sensitive match with the origin that the user age sends to
       the service. You can also use the wildcard character '*' to allow all
       origin domains to make requests via CORS.
      :type allowed_origins: str
      :param allowed_methods: Required. The methods (HTTP request verbs) that
       the origin domain may use for a CORS request. (comma separated)
      :type allowed_methods: str
      :param allowed_headers: Required. the request headers that the origin
       domain may specify on the CORS request.
      :type allowed_headers: str
      :param exposed_headers: Required. The response headers that may be sent in
       the response to the CORS request and exposed by the browser to the request
       issuer
      :type exposed_headers: str
      :param max_age_in_seconds: Required. The maximum amount time that a
       browser should cache the preflight OPTIONS request.
      :type max_age_in_seconds: int
      """
  
      _validation = {
          'allowed_origins': {'required': True},
          'allowed_methods': {'required': True},
          'allowed_headers': {'required': True},
          'exposed_headers': {'required': True},
          'max_age_in_seconds': {'required': True, 'minimum': 0},
      }
  
      _attribute_map = {
          'allowed_origins': {'key': 'AllowedOrigins', 'type': 'str', 'xml': {'name': 'AllowedOrigins'}},
          'allowed_methods': {'key': 'AllowedMethods', 'type': 'str', 'xml': {'name': 'AllowedMethods'}},
          'allowed_headers': {'key': 'AllowedHeaders', 'type': 'str', 'xml': {'name': 'AllowedHeaders'}},
          'exposed_headers': {'key': 'ExposedHeaders', 'type': 'str', 'xml': {'name': 'ExposedHeaders'}},
          'max_age_in_seconds': {'key': 'MaxAgeInSeconds', 'type': 'int', 'xml': {'name': 'MaxAgeInSeconds'}},
      }
      _xml_map = {
          'name': 'CorsRule'
      }
  
      def __init__(self, **kwargs):
          super(CorsRule, self).__init__(**kwargs)
          self.allowed_origins = kwargs.get('allowed_origins', None)
          self.allowed_methods = kwargs.get('allowed_methods', None)
          self.allowed_headers = kwargs.get('allowed_headers', None)
          self.exposed_headers = kwargs.get('exposed_headers', None)
          self.max_age_in_seconds = kwargs.get('max_age_in_seconds', None)
  