<?php
/**
 * FacilityLocalType
 *
 * PHP version 5
 *
 * @category Class
 * @package  Fifa\ConnectId\Sdk\Api
 * @author   Swaagger Codegen team
 * @link     https://github.com/swagger-api/swagger-codegen
 */

/**
 * FIFA Connect ID - ID Directory V6
 *
 * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
 *
 * OpenAPI spec version: v6
 * 
 * Generated by: https://github.com/swagger-api/swagger-codegen.git
 *
 */

/**
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen
 * Do not edit the class manually.
 */

namespace Fifa\ConnectId\Sdk\Api\Model;

use \ArrayAccess;

/**
 * FacilityLocalType Class Doc Comment
 *
 * @category    Class
 * @package     Fifa\ConnectId\Sdk\Api
 * @author      Swagger Codegen team
 * @link        https://github.com/swagger-api/swagger-codegen
 */
class FacilityLocalType implements ArrayAccess
{
    const DISCRIMINATOR = null;

    /**
      * The original name of the model.
      * @var string
      */
    protected static $swaggerModelName = 'FacilityLocalType';

    /**
      * Array of property to type mappings. Used for (de)serialization
      * @var string[]
      */
    protected static $swaggerTypes = [
        'facility_fifa_id' => 'string',
        'status' => 'string',
        'international_name' => 'string',
        'international_short_name' => 'string',
        'local_name' => 'string',
        'local_short_name' => 'string',
        'local_system_ma_id' => 'string',
        'local_language' => 'string',
        'local_country' => 'string',
        'organisation_fifa_id' => 'string',
        'parent_facility_fifa_id' => 'string',
        'local_facility_name' => '\Fifa\ConnectId\Sdk\Api\Model\LocalNameType[]',
        'field' => '\Fifa\ConnectId\Sdk\Api\Model\FieldType[]',
        'official_address' => '\Fifa\ConnectId\Sdk\Api\Model\AddressType',
        'web_address' => 'string',
        'email' => 'string',
        'phone' => 'string',
        'fax' => 'string'
    ];

    public static function swaggerTypes()
    {
        return self::$swaggerTypes;
    }

    /**
     * Array of attributes where the key is the local name, and the value is the original name
     * @var string[]
     */
    protected static $attributeMap = [
        'facility_fifa_id' => 'facilityFIFAId',
        'status' => 'status',
        'international_name' => 'internationalName',
        'international_short_name' => 'internationalShortName',
        'local_name' => 'localName',
        'local_short_name' => 'localShortName',
        'local_system_ma_id' => 'localSystemMAId',
        'local_language' => 'localLanguage',
        'local_country' => 'localCountry',
        'organisation_fifa_id' => 'organisationFIFAId',
        'parent_facility_fifa_id' => 'parentFacilityFIFAId',
        'local_facility_name' => 'localFacilityName',
        'field' => 'field',
        'official_address' => 'officialAddress',
        'web_address' => 'webAddress',
        'email' => 'email',
        'phone' => 'phone',
        'fax' => 'fax'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     * @var string[]
     */
    protected static $setters = [
        'facility_fifa_id' => 'setFacilityFifaId',
        'status' => 'setStatus',
        'international_name' => 'setInternationalName',
        'international_short_name' => 'setInternationalShortName',
        'local_name' => 'setLocalName',
        'local_short_name' => 'setLocalShortName',
        'local_system_ma_id' => 'setLocalSystemMaId',
        'local_language' => 'setLocalLanguage',
        'local_country' => 'setLocalCountry',
        'organisation_fifa_id' => 'setOrganisationFifaId',
        'parent_facility_fifa_id' => 'setParentFacilityFifaId',
        'local_facility_name' => 'setLocalFacilityName',
        'field' => 'setField',
        'official_address' => 'setOfficialAddress',
        'web_address' => 'setWebAddress',
        'email' => 'setEmail',
        'phone' => 'setPhone',
        'fax' => 'setFax'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     * @var string[]
     */
    protected static $getters = [
        'facility_fifa_id' => 'getFacilityFifaId',
        'status' => 'getStatus',
        'international_name' => 'getInternationalName',
        'international_short_name' => 'getInternationalShortName',
        'local_name' => 'getLocalName',
        'local_short_name' => 'getLocalShortName',
        'local_system_ma_id' => 'getLocalSystemMaId',
        'local_language' => 'getLocalLanguage',
        'local_country' => 'getLocalCountry',
        'organisation_fifa_id' => 'getOrganisationFifaId',
        'parent_facility_fifa_id' => 'getParentFacilityFifaId',
        'local_facility_name' => 'getLocalFacilityName',
        'field' => 'getField',
        'official_address' => 'getOfficialAddress',
        'web_address' => 'getWebAddress',
        'email' => 'getEmail',
        'phone' => 'getPhone',
        'fax' => 'getFax'
    ];

    public static function attributeMap()
    {
        return self::$attributeMap;
    }

    public static function setters()
    {
        return self::$setters;
    }

    public static function getters()
    {
        return self::$getters;
    }

    const STATUS_ACTIVE = 'active';
    const STATUS_INACTIVE = 'inactive';
    const STATUS_PENDING = 'pending';

    /**
     * Gets allowable values of the enum
     * @return string[]
     */
    public function getStatusAllowableValues()
    {
        return [
            self::STATUS_ACTIVE,
            self::STATUS_INACTIVE,
            self::STATUS_PENDING,
        ];
    }

    /**
     * Associative array for storing property values
     * @var mixed[]
     */
    protected $container = [];

    /**
     * Constructor
     * @param mixed[] $data Associated array of property values initializing the model
     */
    public function __construct(array $data = null)
    {
        $this->container['facility_fifa_id'] = isset($data['facility_fifa_id']) ? $data['facility_fifa_id'] : null;
        $this->container['status'] = isset($data['status']) ? $data['status'] : null;
        $this->container['international_name'] = isset($data['international_name']) ? $data['international_name'] : null;
        $this->container['international_short_name'] = isset($data['international_short_name']) ? $data['international_short_name'] : null;
        $this->container['local_name'] = isset($data['local_name']) ? $data['local_name'] : null;
        $this->container['local_short_name'] = isset($data['local_short_name']) ? $data['local_short_name'] : null;
        $this->container['local_system_ma_id'] = isset($data['local_system_ma_id']) ? $data['local_system_ma_id'] : null;
        $this->container['local_language'] = isset($data['local_language']) ? $data['local_language'] : null;
        $this->container['local_country'] = isset($data['local_country']) ? $data['local_country'] : null;
        $this->container['organisation_fifa_id'] = isset($data['organisation_fifa_id']) ? $data['organisation_fifa_id'] : null;
        $this->container['parent_facility_fifa_id'] = isset($data['parent_facility_fifa_id']) ? $data['parent_facility_fifa_id'] : null;
        $this->container['local_facility_name'] = isset($data['local_facility_name']) ? $data['local_facility_name'] : null;
        $this->container['field'] = isset($data['field']) ? $data['field'] : null;
        $this->container['official_address'] = isset($data['official_address']) ? $data['official_address'] : null;
        $this->container['web_address'] = isset($data['web_address']) ? $data['web_address'] : null;
        $this->container['email'] = isset($data['email']) ? $data['email'] : null;
        $this->container['phone'] = isset($data['phone']) ? $data['phone'] : null;
        $this->container['fax'] = isset($data['fax']) ? $data['fax'] : null;
    }

    /**
     * show all the invalid properties with reasons.
     *
     * @return array invalid properties with reasons
     */
    public function listInvalidProperties()
    {
        $invalid_properties = [];

        if ($this->container['status'] === null) {
            $invalid_properties[] = "'status' can't be null";
        }
        $allowed_values = ["active", "inactive", "pending"];
        if (!in_array($this->container['status'], $allowed_values)) {
            $invalid_properties[] = "invalid value for 'status', must be one of 'active', 'inactive', 'pending'.";
        }

        if ($this->container['local_name'] === null) {
            $invalid_properties[] = "'local_name' can't be null";
        }

        if ($this->container['local_language'] === null) {
            $invalid_properties[] = "'local_language' can't be null";
        }

        if ($this->container['local_country'] === null) {
            $invalid_properties[] = "'local_country' can't be null";
        }

        if ($this->container['organisation_fifa_id'] === null) {
            $invalid_properties[] = "'organisation_fifa_id' can't be null";
        }

        if ($this->container['official_address'] === null) {
            $invalid_properties[] = "'official_address' can't be null";
        }

        return $invalid_properties;
    }

    /**
     * validate all the properties in the model
     * return true if all passed
     *
     * @return bool True if all properties are valid
     */
    public function valid()
    {

        if ($this->container['status'] === null) {
            return false;
        }
        $allowed_values = ["active", "inactive", "pending"];
        if (!in_array($this->container['status'], $allowed_values)) {
            return false;
        }
        if ($this->container['local_name'] === null) {
            return false;
        }

        if ($this->container['local_language'] === null) {
            return false;
        }

        if ($this->container['local_country'] === null) {
            return false;
        }

        if ($this->container['organisation_fifa_id'] === null) {
            return false;
        }

        if ($this->container['official_address'] === null) {
            return false;
        }

        return true;
    }

    /**
     * Gets facility_fifa_id
     * @return string
     */
    public function getFacilityFifaId()
    {
        return $this->container['facility_fifa_id'];
    }

    /**
     * Sets facility_fifa_id
     * @param string $facility_fifa_id
     * @return $this
     */
    public function setFacilityFifaId($facility_fifa_id)
    {
        $this->container['facility_fifa_id'] = $facility_fifa_id;

        return $this;
    }

    /**
     * Gets status
     * @return string
     */
    public function getStatus()
    {
        return $this->container['status'];
    }

    /**
     * Sets status
     * @param string $status
     * @return $this
     */
    public function setStatus($status)
    {
        $allowed_values = array('active', 'inactive', 'pending');
        if ((!in_array($status, $allowed_values))) {
            throw new \InvalidArgumentException("Invalid value for 'status', must be one of 'active', 'inactive', 'pending'");
        }
        $this->container['status'] = $status;

        return $this;
    }

    /**
     * Gets international_name
     * @return string
     */
    public function getInternationalName()
    {
        return $this->container['international_name'];
    }

    /**
     * Sets international_name
     * @param string $international_name
     * @return $this
     */
    public function setInternationalName($international_name)
    {
        $this->container['international_name'] = $international_name;

        return $this;
    }

    /**
     * Gets international_short_name
     * @return string
     */
    public function getInternationalShortName()
    {
        return $this->container['international_short_name'];
    }

    /**
     * Sets international_short_name
     * @param string $international_short_name
     * @return $this
     */
    public function setInternationalShortName($international_short_name)
    {
        $this->container['international_short_name'] = $international_short_name;

        return $this;
    }

    /**
     * Gets local_name
     * @return string
     */
    public function getLocalName()
    {
        return $this->container['local_name'];
    }

    /**
     * Sets local_name
     * @param string $local_name
     * @return $this
     */
    public function setLocalName($local_name)
    {

        $this->container['local_name'] = $local_name;

        return $this;
    }

    /**
     * Gets local_short_name
     * @return string
     */
    public function getLocalShortName()
    {
        return $this->container['local_short_name'];
    }

    /**
     * Sets local_short_name
     * @param string $local_short_name
     * @return $this
     */
    public function setLocalShortName($local_short_name)
    {
        $this->container['local_short_name'] = $local_short_name;

        return $this;
    }

    /**
     * Gets local_system_ma_id
     * @return string
     */
    public function getLocalSystemMaId()
    {
        return $this->container['local_system_ma_id'];
    }

    /**
     * Sets local_system_ma_id
     * @param string $local_system_ma_id
     * @return $this
     */
    public function setLocalSystemMaId($local_system_ma_id)
    {
        $this->container['local_system_ma_id'] = $local_system_ma_id;

        return $this;
    }

    /**
     * Gets local_language
     * @return string
     */
    public function getLocalLanguage()
    {
        return $this->container['local_language'];
    }

    /**
     * Sets local_language
     * @param string $local_language
     * @return $this
     */
    public function setLocalLanguage($local_language)
    {

        $this->container['local_language'] = $local_language;

        return $this;
    }

    /**
     * Gets local_country
     * @return string
     */
    public function getLocalCountry()
    {
        return $this->container['local_country'];
    }

    /**
     * Sets local_country
     * @param string $local_country
     * @return $this
     */
    public function setLocalCountry($local_country)
    {

        $this->container['local_country'] = $local_country;

        return $this;
    }

    /**
     * Gets organisation_fifa_id
     * @return string
     */
    public function getOrganisationFifaId()
    {
        return $this->container['organisation_fifa_id'];
    }

    /**
     * Sets organisation_fifa_id
     * @param string $organisation_fifa_id
     * @return $this
     */
    public function setOrganisationFifaId($organisation_fifa_id)
    {

        $this->container['organisation_fifa_id'] = $organisation_fifa_id;

        return $this;
    }

    /**
     * Gets parent_facility_fifa_id
     * @return string
     */
    public function getParentFacilityFifaId()
    {
        return $this->container['parent_facility_fifa_id'];
    }

    /**
     * Sets parent_facility_fifa_id
     * @param string $parent_facility_fifa_id
     * @return $this
     */
    public function setParentFacilityFifaId($parent_facility_fifa_id)
    {
        $this->container['parent_facility_fifa_id'] = $parent_facility_fifa_id;

        return $this;
    }

    /**
     * Gets local_facility_name
     * @return \Fifa\ConnectId\Sdk\Api\Model\LocalNameType[]
     */
    public function getLocalFacilityName()
    {
        return $this->container['local_facility_name'];
    }

    /**
     * Sets local_facility_name
     * @param \Fifa\ConnectId\Sdk\Api\Model\LocalNameType[] $local_facility_name
     * @return $this
     */
    public function setLocalFacilityName($local_facility_name)
    {
        $this->container['local_facility_name'] = $local_facility_name;

        return $this;
    }

    /**
     * Gets field
     * @return \Fifa\ConnectId\Sdk\Api\Model\FieldType[]
     */
    public function getField()
    {
        return $this->container['field'];
    }

    /**
     * Sets field
     * @param \Fifa\ConnectId\Sdk\Api\Model\FieldType[] $field
     * @return $this
     */
    public function setField($field)
    {
        $this->container['field'] = $field;

        return $this;
    }

    /**
     * Gets official_address
     * @return \Fifa\ConnectId\Sdk\Api\Model\AddressType
     */
    public function getOfficialAddress()
    {
        return $this->container['official_address'];
    }

    /**
     * Sets official_address
     * @param \Fifa\ConnectId\Sdk\Api\Model\AddressType $official_address
     * @return $this
     */
    public function setOfficialAddress($official_address)
    {
        $this->container['official_address'] = $official_address;

        return $this;
    }

    /**
     * Gets web_address
     * @return string
     */
    public function getWebAddress()
    {
        return $this->container['web_address'];
    }

    /**
     * Sets web_address
     * @param string $web_address
     * @return $this
     */
    public function setWebAddress($web_address)
    {
        $this->container['web_address'] = $web_address;

        return $this;
    }

    /**
     * Gets email
     * @return string
     */
    public function getEmail()
    {
        return $this->container['email'];
    }

    /**
     * Sets email
     * @param string $email
     * @return $this
     */
    public function setEmail($email)
    {

        $this->container['email'] = $email;

        return $this;
    }

    /**
     * Gets phone
     * @return string
     */
    public function getPhone()
    {
        return $this->container['phone'];
    }

    /**
     * Sets phone
     * @param string $phone
     * @return $this
     */
    public function setPhone($phone)
    {
        $this->container['phone'] = $phone;

        return $this;
    }

    /**
     * Gets fax
     * @return string
     */
    public function getFax()
    {
        return $this->container['fax'];
    }

    /**
     * Sets fax
     * @param string $fax
     * @return $this
     */
    public function setFax($fax)
    {
        $this->container['fax'] = $fax;

        return $this;
    }
    /**
     * Returns true if offset exists. False otherwise.
     * @param  integer $offset Offset
     * @return boolean
     */
    public function offsetExists($offset)
    {
        return isset($this->container[$offset]);
    }

    /**
     * Gets offset.
     * @param  integer $offset Offset
     * @return mixed
     */
    public function offsetGet($offset)
    {
        return isset($this->container[$offset]) ? $this->container[$offset] : null;
    }

    /**
     * Sets value based on offset.
     * @param  integer $offset Offset
     * @param  mixed   $value  Value to be set
     * @return void
     */
    public function offsetSet($offset, $value)
    {
        if (is_null($offset)) {
            $this->container[] = $value;
        } else {
            $this->container[$offset] = $value;
        }
    }

    /**
     * Unsets offset.
     * @param  integer $offset Offset
     * @return void
     */
    public function offsetUnset($offset)
    {
        unset($this->container[$offset]);
    }

    /**
     * Gets the string presentation of the object
     * @return string
     */
    public function __toString()
    {
        if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
            return json_encode(\Fifa\ConnectId\Sdk\Api\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
        }

        return json_encode(\Fifa\ConnectId\Sdk\Api\ObjectSerializer::sanitizeForSerialization($this));
    }
}


