<?php
/**
 * Guild
 *
 * PHP version 5
 *
 * @category Class
 * @package  Swagger\Client
 * @author   Swagger Codegen team
 * @link     https://github.com/swagger-api/swagger-codegen
 */

/**
 * BitMEX API
 *
 * ## REST API for the BitMEX Trading Platform  _If you are building automated tools, please subscribe to the_ _[BitMEX API RSS Feed](https://blog.bitmex.com/api_announcement/feed/) for changes. The feed will be updated_ _regularly and is the most reliable way to get downtime and update announcements._  [View Changelog](/app/apiChangelog)  -  #### Getting Started  Base URI: [https://www.bitmex.com/api/v1](/api/v1)  ##### Fetching Data  All REST endpoints are documented below. You can try out any query right from this interface.  Most table queries accept `count`, `start`, and `reverse` params. Set `reverse=true` to get rows newest-first.  Additional documentation regarding filters, timestamps, and authentication is available in [the main API documentation](/app/restAPI).  _All_ table data is available via the [Websocket](/app/wsAPI). We highly recommend using the socket if you want to have the quickest possible data without being subject to ratelimits.  ##### Return Types  By default, all data is returned as JSON. Send `?_format=csv` to get CSV data or `?_format=xml` to get XML data.  ##### Trade Data Queries  _This is only a small subset of what is available, to get you started._  Fill in the parameters and click the `Try it out!` button to try any of these queries.  - [Pricing Data](#!/Quote/Quote_get)  - [Trade Data](#!/Trade/Trade_get)  - [OrderBook Data](#!/OrderBook/OrderBook_getL2)  - [Settlement Data](#!/Settlement/Settlement_get)  - [Exchange Statistics](#!/Stats/Stats_history)  Every function of the BitMEX.com platform is exposed here and documented. Many more functions are available.  ##### Swagger Specification  [⇩ Download Swagger JSON](swagger.json)  -  ## All API Endpoints  Click to expand a section.
 *
 * OpenAPI spec version: 1.2.0
 * Contact: support@bitmex.com
 * Generated by: https://github.com/swagger-api/swagger-codegen.git
 * Swagger Codegen version: 2.4.42-SNAPSHOT
 */

/**
 * 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 Swagger\Client\Model;

use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;

/**
 * Guild Class Doc Comment
 *
 * @category Class
 * @package  Swagger\Client
 * @author   Swagger Codegen team
 * @link     https://github.com/swagger-api/swagger-codegen
 */
class Guild implements ModelInterface, ArrayAccess
{
    const DISCRIMINATOR = null;

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $swaggerTypes = [
        'id' => 'int',
        'created' => '\DateTime',
        'updated' => '\DateTime',
        'archived' => 'bool',
        'name' => 'string',
        'img_url' => 'string',
        'mobile_hero_img_url' => 'string',
        'emoji' => 'string',
        'logo_url' => 'string',
        'description' => 'string',
        'chat_channel_id' => 'double',
        'is_private' => 'bool',
        'affiliate_id' => 'string',
        'pot_distribution_preferences' => 'object',
        'socials' => 'object',
        'deleted' => 'bool'
    ];

    /**
      * Array of property to format mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $swaggerFormats = [
        'id' => 'int32',
        'created' => 'date-time',
        'updated' => 'date-time',
        'archived' => null,
        'name' => null,
        'img_url' => null,
        'mobile_hero_img_url' => null,
        'emoji' => null,
        'logo_url' => null,
        'description' => null,
        'chat_channel_id' => 'double',
        'is_private' => null,
        'affiliate_id' => null,
        'pot_distribution_preferences' => null,
        'socials' => null,
        'deleted' => null
    ];

    /**
     * Array of property to type mappings. Used for (de)serialization
     *
     * @return array
     */
    public static function swaggerTypes()
    {
        return self::$swaggerTypes;
    }

    /**
     * Array of property to format mappings. Used for (de)serialization
     *
     * @return array
     */
    public static function swaggerFormats()
    {
        return self::$swaggerFormats;
    }

    /**
     * Array of attributes where the key is the local name,
     * and the value is the original name
     *
     * @var string[]
     */
    protected static $attributeMap = [
        'id' => 'id',
        'created' => 'created',
        'updated' => 'updated',
        'archived' => 'archived',
        'name' => 'name',
        'img_url' => 'imgUrl',
        'mobile_hero_img_url' => 'mobileHeroImgUrl',
        'emoji' => 'emoji',
        'logo_url' => 'logoUrl',
        'description' => 'description',
        'chat_channel_id' => 'chatChannelId',
        'is_private' => 'isPrivate',
        'affiliate_id' => 'affiliateId',
        'pot_distribution_preferences' => 'potDistributionPreferences',
        'socials' => 'socials',
        'deleted' => 'deleted'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'id' => 'setId',
        'created' => 'setCreated',
        'updated' => 'setUpdated',
        'archived' => 'setArchived',
        'name' => 'setName',
        'img_url' => 'setImgUrl',
        'mobile_hero_img_url' => 'setMobileHeroImgUrl',
        'emoji' => 'setEmoji',
        'logo_url' => 'setLogoUrl',
        'description' => 'setDescription',
        'chat_channel_id' => 'setChatChannelId',
        'is_private' => 'setIsPrivate',
        'affiliate_id' => 'setAffiliateId',
        'pot_distribution_preferences' => 'setPotDistributionPreferences',
        'socials' => 'setSocials',
        'deleted' => 'setDeleted'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'id' => 'getId',
        'created' => 'getCreated',
        'updated' => 'getUpdated',
        'archived' => 'getArchived',
        'name' => 'getName',
        'img_url' => 'getImgUrl',
        'mobile_hero_img_url' => 'getMobileHeroImgUrl',
        'emoji' => 'getEmoji',
        'logo_url' => 'getLogoUrl',
        'description' => 'getDescription',
        'chat_channel_id' => 'getChatChannelId',
        'is_private' => 'getIsPrivate',
        'affiliate_id' => 'getAffiliateId',
        'pot_distribution_preferences' => 'getPotDistributionPreferences',
        'socials' => 'getSocials',
        'deleted' => 'getDeleted'
    ];

    /**
     * Array of attributes where the key is the local name,
     * and the value is the original name
     *
     * @return array
     */
    public static function attributeMap()
    {
        return self::$attributeMap;
    }

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @return array
     */
    public static function setters()
    {
        return self::$setters;
    }

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @return array
     */
    public static function getters()
    {
        return self::$getters;
    }

    /**
     * The original name of the model.
     *
     * @return string
     */
    public function getModelName()
    {
        return self::$swaggerModelName;
    }

    

    

    /**
     * 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['id'] = isset($data['id']) ? $data['id'] : null;
        $this->container['created'] = isset($data['created']) ? $data['created'] : null;
        $this->container['updated'] = isset($data['updated']) ? $data['updated'] : null;
        $this->container['archived'] = isset($data['archived']) ? $data['archived'] : null;
        $this->container['name'] = isset($data['name']) ? $data['name'] : null;
        $this->container['img_url'] = isset($data['img_url']) ? $data['img_url'] : null;
        $this->container['mobile_hero_img_url'] = isset($data['mobile_hero_img_url']) ? $data['mobile_hero_img_url'] : null;
        $this->container['emoji'] = isset($data['emoji']) ? $data['emoji'] : null;
        $this->container['logo_url'] = isset($data['logo_url']) ? $data['logo_url'] : null;
        $this->container['description'] = isset($data['description']) ? $data['description'] : null;
        $this->container['chat_channel_id'] = isset($data['chat_channel_id']) ? $data['chat_channel_id'] : null;
        $this->container['is_private'] = isset($data['is_private']) ? $data['is_private'] : null;
        $this->container['affiliate_id'] = isset($data['affiliate_id']) ? $data['affiliate_id'] : null;
        $this->container['pot_distribution_preferences'] = isset($data['pot_distribution_preferences']) ? $data['pot_distribution_preferences'] : null;
        $this->container['socials'] = isset($data['socials']) ? $data['socials'] : null;
        $this->container['deleted'] = isset($data['deleted']) ? $data['deleted'] : null;
    }

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

        if ($this->container['created'] === null) {
            $invalidProperties[] = "'created' can't be null";
        }
        if ($this->container['updated'] === null) {
            $invalidProperties[] = "'updated' can't be null";
        }
        if ($this->container['name'] === null) {
            $invalidProperties[] = "'name' can't be null";
        }
        if ($this->container['chat_channel_id'] === null) {
            $invalidProperties[] = "'chat_channel_id' can't be null";
        }
        if ($this->container['is_private'] === null) {
            $invalidProperties[] = "'is_private' can't be null";
        }
        return $invalidProperties;
    }

    /**
     * Validate all the properties in the model
     * return true if all passed
     *
     * @return bool True if all properties are valid
     */
    public function valid()
    {
        return count($this->listInvalidProperties()) === 0;
    }


    /**
     * Gets id
     *
     * @return int
     */
    public function getId()
    {
        return $this->container['id'];
    }

    /**
     * Sets id
     *
     * @param int $id id
     *
     * @return $this
     */
    public function setId($id)
    {
        $this->container['id'] = $id;

        return $this;
    }

    /**
     * Gets created
     *
     * @return \DateTime
     */
    public function getCreated()
    {
        return $this->container['created'];
    }

    /**
     * Sets created
     *
     * @param \DateTime $created created
     *
     * @return $this
     */
    public function setCreated($created)
    {
        $this->container['created'] = $created;

        return $this;
    }

    /**
     * Gets updated
     *
     * @return \DateTime
     */
    public function getUpdated()
    {
        return $this->container['updated'];
    }

    /**
     * Sets updated
     *
     * @param \DateTime $updated updated
     *
     * @return $this
     */
    public function setUpdated($updated)
    {
        $this->container['updated'] = $updated;

        return $this;
    }

    /**
     * Gets archived
     *
     * @return bool
     */
    public function getArchived()
    {
        return $this->container['archived'];
    }

    /**
     * Sets archived
     *
     * @param bool $archived archived
     *
     * @return $this
     */
    public function setArchived($archived)
    {
        $this->container['archived'] = $archived;

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Gets chat_channel_id
     *
     * @return double
     */
    public function getChatChannelId()
    {
        return $this->container['chat_channel_id'];
    }

    /**
     * Sets chat_channel_id
     *
     * @param double $chat_channel_id chat_channel_id
     *
     * @return $this
     */
    public function setChatChannelId($chat_channel_id)
    {
        $this->container['chat_channel_id'] = $chat_channel_id;

        return $this;
    }

    /**
     * Gets is_private
     *
     * @return bool
     */
    public function getIsPrivate()
    {
        return $this->container['is_private'];
    }

    /**
     * Sets is_private
     *
     * @param bool $is_private is_private
     *
     * @return $this
     */
    public function setIsPrivate($is_private)
    {
        $this->container['is_private'] = $is_private;

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Gets pot_distribution_preferences
     *
     * @return object
     */
    public function getPotDistributionPreferences()
    {
        return $this->container['pot_distribution_preferences'];
    }

    /**
     * Sets pot_distribution_preferences
     *
     * @param object $pot_distribution_preferences pot_distribution_preferences
     *
     * @return $this
     */
    public function setPotDistributionPreferences($pot_distribution_preferences)
    {
        $this->container['pot_distribution_preferences'] = $pot_distribution_preferences;

        return $this;
    }

    /**
     * Gets socials
     *
     * @return object
     */
    public function getSocials()
    {
        return $this->container['socials'];
    }

    /**
     * Sets socials
     *
     * @param object $socials socials
     *
     * @return $this
     */
    public function setSocials($socials)
    {
        $this->container['socials'] = $socials;

        return $this;
    }

    /**
     * Gets deleted
     *
     * @return bool
     */
    public function getDeleted()
    {
        return $this->container['deleted'];
    }

    /**
     * Sets deleted
     *
     * @param bool $deleted deleted
     *
     * @return $this
     */
    public function setDeleted($deleted)
    {
        $this->container['deleted'] = $deleted;

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

    /**
     * Gets offset.
     *
     * @param integer $offset Offset
     *
     * @return mixed
     */
    #[\ReturnTypeWillChange]
    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
     */
    #[\ReturnTypeWillChange]
    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
     */
    #[\ReturnTypeWillChange]
    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(
                ObjectSerializer::sanitizeForSerialization($this),
                JSON_PRETTY_PRINT
            );
        }

        return json_encode(ObjectSerializer::sanitizeForSerialization($this));
    }
}


