<?php
/**
 * TeamOfficialRegistrationType
 *
 * 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;

/**
 * TeamOfficialRegistrationType Class Doc Comment
 *
 * @category    Class
 * @description This represents a team official registration (e.g. Coach) and its attributes. A team official registration is assigned to a person. A team official registration marks a person as a team official for an organisation and the given validity period.
 * @package     Fifa\ConnectId\Sdk\Api
 * @author      Swagger Codegen team
 * @link        https://github.com/swagger-api/swagger-codegen
 */
class TeamOfficialRegistrationType implements ArrayAccess
{
    const DISCRIMINATOR = null;

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      * @var string[]
      */
    protected static $swaggerTypes = [
        'team_official_role' => 'string',
        'discipline' => 'string',
        'organisation_fifa_id' => 'string',
        'status' => 'string',
        'system_id' => '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 = [
        'team_official_role' => 'teamOfficialRole',
        'discipline' => 'discipline',
        'organisation_fifa_id' => 'organisationFIFAId',
        'status' => 'status',
        'system_id' => 'systemId'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     * @var string[]
     */
    protected static $setters = [
        'team_official_role' => 'setTeamOfficialRole',
        'discipline' => 'setDiscipline',
        'organisation_fifa_id' => 'setOrganisationFifaId',
        'status' => 'setStatus',
        'system_id' => 'setSystemId'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     * @var string[]
     */
    protected static $getters = [
        'team_official_role' => 'getTeamOfficialRole',
        'discipline' => 'getDiscipline',
        'organisation_fifa_id' => 'getOrganisationFifaId',
        'status' => 'getStatus',
        'system_id' => 'getSystemId'
    ];

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

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

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

    const TEAM_OFFICIAL_ROLE_ASSISTANT_COACH = 'AssistantCoach';
    const TEAM_OFFICIAL_ROLE_COACH = 'Coach';
    const TEAM_OFFICIAL_ROLE_GOALKEEPER_COACH = 'GoalkeeperCoach';
    const TEAM_OFFICIAL_ROLE_PHYSICAL_TRAINER = 'PhysicalTrainer';
    const TEAM_OFFICIAL_ROLE_PHYSIOTHERAPIST = 'Physiotherapist';
    const TEAM_OFFICIAL_ROLE_TEAM_DOCTOR = 'TeamDoctor';
    const TEAM_OFFICIAL_ROLE_OTHER = 'Other';
    const DISCIPLINE_FOOTBALL = 'Football';
    const DISCIPLINE_FUTSAL = 'Futsal';
    const DISCIPLINE_BEACH_SOCCER = 'BeachSoccer';
    const STATUS_ACTIVE = 'active';
    const STATUS_INACTIVE = 'inactive';
    const STATUS_PENDING = 'pending';

    /**
     * Gets allowable values of the enum
     * @return string[]
     */
    public function getTeamOfficialRoleAllowableValues()
    {
        return [
            self::TEAM_OFFICIAL_ROLE_ASSISTANT_COACH,
            self::TEAM_OFFICIAL_ROLE_COACH,
            self::TEAM_OFFICIAL_ROLE_GOALKEEPER_COACH,
            self::TEAM_OFFICIAL_ROLE_PHYSICAL_TRAINER,
            self::TEAM_OFFICIAL_ROLE_PHYSIOTHERAPIST,
            self::TEAM_OFFICIAL_ROLE_TEAM_DOCTOR,
            self::TEAM_OFFICIAL_ROLE_OTHER,
        ];
    }

    /**
     * Gets allowable values of the enum
     * @return string[]
     */
    public function getDisciplineAllowableValues()
    {
        return [
            self::DISCIPLINE_FOOTBALL,
            self::DISCIPLINE_FUTSAL,
            self::DISCIPLINE_BEACH_SOCCER,
        ];
    }

    /**
     * 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['team_official_role'] = isset($data['team_official_role']) ? $data['team_official_role'] : null;
        $this->container['discipline'] = isset($data['discipline']) ? $data['discipline'] : null;
        $this->container['organisation_fifa_id'] = isset($data['organisation_fifa_id']) ? $data['organisation_fifa_id'] : null;
        $this->container['status'] = isset($data['status']) ? $data['status'] : null;
        $this->container['system_id'] = isset($data['system_id']) ? $data['system_id'] : null;
    }

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

        if ($this->container['team_official_role'] === null) {
            $invalid_properties[] = "'team_official_role' can't be null";
        }
        $allowed_values = ["AssistantCoach", "Coach", "GoalkeeperCoach", "PhysicalTrainer", "Physiotherapist", "TeamDoctor", "Other"];
        if (!in_array($this->container['team_official_role'], $allowed_values)) {
            $invalid_properties[] = "invalid value for 'team_official_role', must be one of 'AssistantCoach', 'Coach', 'GoalkeeperCoach', 'PhysicalTrainer', 'Physiotherapist', 'TeamDoctor', 'Other'.";
        }

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

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

        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'.";
        }

        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['team_official_role'] === null) {
            return false;
        }
        $allowed_values = ["AssistantCoach", "Coach", "GoalkeeperCoach", "PhysicalTrainer", "Physiotherapist", "TeamDoctor", "Other"];
        if (!in_array($this->container['team_official_role'], $allowed_values)) {
            return false;
        }
        if ($this->container['discipline'] === null) {
            return false;
        }
        $allowed_values = ["Football", "Futsal", "BeachSoccer"];
        if (!in_array($this->container['discipline'], $allowed_values)) {
            return false;
        }
        if ($this->container['organisation_fifa_id'] === null) {
            return false;
        }

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

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

    /**
     * Sets team_official_role
     * @param string $team_official_role The team official role type, e.g. Coach or Team Doctor.
     * @return $this
     */
    public function setTeamOfficialRole($team_official_role)
    {
        $allowed_values = array('AssistantCoach', 'Coach', 'GoalkeeperCoach', 'PhysicalTrainer', 'Physiotherapist', 'TeamDoctor', 'Other');
        if ((!in_array($team_official_role, $allowed_values))) {
            throw new \InvalidArgumentException("Invalid value for 'team_official_role', must be one of 'AssistantCoach', 'Coach', 'GoalkeeperCoach', 'PhysicalTrainer', 'Physiotherapist', 'TeamDoctor', 'Other'");
        }
        $this->container['team_official_role'] = $team_official_role;

        return $this;
    }

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

    /**
     * Sets discipline
     * @param string $discipline The sport/discipline this registration is for, e.g. a futsal coach registration is distinct from a football coach registration.
     * @return $this
     */
    public function setDiscipline($discipline)
    {
        $allowed_values = array('Football', 'Futsal', 'BeachSoccer');
        if ((!in_array($discipline, $allowed_values))) {
            throw new \InvalidArgumentException("Invalid value for 'discipline', must be one of 'Football', 'Futsal', 'BeachSoccer'");
        }
        $this->container['discipline'] = $discipline;

        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 The worldwide unique FIFA id of the club or organisation the person is registered for.
     * @return $this
     */
    public function setOrganisationFifaId($organisation_fifa_id)
    {

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

        return $this;
    }

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

    /**
     * Sets status
     * @param string $status The status of the registration.
     * @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 system_id
     * @return string
     */
    public function getSystemId()
    {
        return $this->container['system_id'];
    }

    /**
     * Sets system_id
     * @param string $system_id The identifier of the system to which the registration belongs
     * @return $this
     */
    public function setSystemId($system_id)
    {
        $this->container['system_id'] = $system_id;

        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));
    }
}


