File: address.py

package info (click to toggle)
python-azure 20181112%2Bgit-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 407,300 kB
  • sloc: python: 717,190; makefile: 201; sh: 76
file content (58 lines) | stat: -rw-r--r-- 2,145 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# 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 Address(Model):
    """Address information for domain registration.

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

    :param address1: Required. First line of an Address.
    :type address1: str
    :param address2: The second line of the Address. Optional.
    :type address2: str
    :param city: Required. The city for the address.
    :type city: str
    :param country: Required. The country for the address.
    :type country: str
    :param postal_code: Required. The postal code for the address.
    :type postal_code: str
    :param state: Required. The state or province for the address.
    :type state: str
    """

    _validation = {
        'address1': {'required': True},
        'city': {'required': True},
        'country': {'required': True},
        'postal_code': {'required': True},
        'state': {'required': True},
    }

    _attribute_map = {
        'address1': {'key': 'address1', 'type': 'str'},
        'address2': {'key': 'address2', 'type': 'str'},
        'city': {'key': 'city', 'type': 'str'},
        'country': {'key': 'country', 'type': 'str'},
        'postal_code': {'key': 'postalCode', 'type': 'str'},
        'state': {'key': 'state', 'type': 'str'},
    }

    def __init__(self, **kwargs):
        super(Address, self).__init__(**kwargs)
        self.address1 = kwargs.get('address1', None)
        self.address2 = kwargs.get('address2', None)
        self.city = kwargs.get('city', None)
        self.country = kwargs.get('country', None)
        self.postal_code = kwargs.get('postal_code', None)
        self.state = kwargs.get('state', None)