# coding=utf-8
# --------------------------------------------------------------------------
# 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 PlaceCreate(Model):
    """PlaceCreate.

    :param place_code: The place code <span
     class='property-internal'>Required</span> <span
     class='property-internal'>Must be between 0 and 32 characters</span>
    :type place_code: str
    :param place_info: The place info <span
     class='property-internal'>Required</span> <span
     class='property-internal'>Must be between 0 and 50 characters</span>
    :type place_info: str
    :param parent_place_id: The identifier for the parent of the place. The
     parent is the place directly above the current place on the buildings and
     meters tree <span class='property-internal'>Required</span> <span
     class='property-internal'>Topmost (Place)</span>
    :type parent_place_id: int
    :param place_type_id: The identifier for the place type <span
     class='property-internal'>Required</span>
    :type place_type_id: int
    :param primary_use_id: The identifier for the place's primary use
    :type primary_use_id: int
    :param build_date: The date and time the place was built
    :type build_date: datetime
    :param address:
    :type address: ~energycap.sdk.models.AddressChild
    :param weather_station_code: The code for the weather station the place is
     assigned to <span class='property-internal'>Must be between 0 and 32
     characters</span>
    :type weather_station_code: str
    """

    _validation = {
        'place_code': {'required': True, 'max_length': 32, 'min_length': 0},
        'place_info': {'required': True, 'max_length': 50, 'min_length': 0},
        'parent_place_id': {'required': True},
        'place_type_id': {'required': True},
        'weather_station_code': {'max_length': 32, 'min_length': 0},
    }

    _attribute_map = {
        'place_code': {'key': 'placeCode', 'type': 'str'},
        'place_info': {'key': 'placeInfo', 'type': 'str'},
        'parent_place_id': {'key': 'parentPlaceId', 'type': 'int'},
        'place_type_id': {'key': 'placeTypeId', 'type': 'int'},
        'primary_use_id': {'key': 'primaryUseId', 'type': 'int'},
        'build_date': {'key': 'buildDate', 'type': 'iso-8601'},
        'address': {'key': 'address', 'type': 'AddressChild'},
        'weather_station_code': {'key': 'weatherStationCode', 'type': 'str'},
    }

    def __init__(self, place_code, place_info, parent_place_id, place_type_id, primary_use_id=None, build_date=None, address=None, weather_station_code=None):
        super(PlaceCreate, self).__init__()
        self.place_code = place_code
        self.place_info = place_info
        self.parent_place_id = parent_place_id
        self.place_type_id = place_type_id
        self.primary_use_id = primary_use_id
        self.build_date = build_date
        self.address = address
        self.weather_station_code = weather_station_code
