<?php
/**
 * ErrorResponse409
 *
 * PHP version 5
 *
 * @category Class
 * @package  Swagger\Client
 * @author   http://github.com/swagger-api/swagger-codegen
 * @license  http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
 * @link     https://github.com/swagger-api/swagger-codegen
 */

/**
 * Swagger Blended Hub API Explorer
 *
 * A collection of Swagger documentation for the Blended Hub APIs.
 *
 * OpenAPI spec version: 1.0.0
 * Contact: api@blended.co
 * Generated by: https://github.com/swagger-api/swagger-codegen.git
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/**
 * 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;

/**
 * ErrorResponse409 Class Doc Comment
 *
 * @category    Class */
/** 
 * @package     Swagger\Client
 * @author      http://github.com/swagger-api/swagger-codegen
 * @license     http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
 * @link        https://github.com/swagger-api/swagger-codegen
 */
class ErrorResponse409 implements ArrayAccess
{
    /**
      * The original name of the model.
      * @var string
      */
    protected static $swaggerModelName = 'ErrorResponse409';

    /**
      * Array of property to type mappings. Used for (de)serialization
      * @var string[]
      */
    protected static $swaggerTypes = array(
        'status_code' => 'int',
        'errors' => 'string[]',
        'purchase_packages_required' => 'string[]',
        'purchase_packages_given' => 'string[]',
        'auto_share_packages_required' => 'string[]',
        'auto_share_packages_given' => '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 = array(
        'status_code' => 'status_code',
        'errors' => 'errors',
        'purchase_packages_required' => 'purchase_packages_required',
        'purchase_packages_given' => 'purchase_packages_given',
        'auto_share_packages_required' => 'auto_share_packages_required',
        'auto_share_packages_given' => 'auto_share_packages_given'
    );

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

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     * @var string[]
     */
    protected static $setters = array(
        'status_code' => 'setStatusCode',
        'errors' => 'setErrors',
        'purchase_packages_required' => 'setPurchasePackagesRequired',
        'purchase_packages_given' => 'setPurchasePackagesGiven',
        'auto_share_packages_required' => 'setAutoSharePackagesRequired',
        'auto_share_packages_given' => 'setAutoSharePackagesGiven'
    );

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

    /**
     * Array of attributes to getter functions (for serialization of requests)
     * @var string[]
     */
    protected static $getters = array(
        'status_code' => 'getStatusCode',
        'errors' => 'getErrors',
        'purchase_packages_required' => 'getPurchasePackagesRequired',
        'purchase_packages_given' => 'getPurchasePackagesGiven',
        'auto_share_packages_required' => 'getAutoSharePackagesRequired',
        'auto_share_packages_given' => 'getAutoSharePackagesGiven'
    );

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

    

    

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

    /**
     * Constructor
     * @param mixed[] $data Associated array of property value initalizing the model
     */
    public function __construct(array $data = null)
    {
        $this->container['status_code'] = isset($data['status_code']) ? $data['status_code'] : null;
        $this->container['errors'] = isset($data['errors']) ? $data['errors'] : null;
        $this->container['purchase_packages_required'] = isset($data['purchase_packages_required']) ? $data['purchase_packages_required'] : null;
        $this->container['purchase_packages_given'] = isset($data['purchase_packages_given']) ? $data['purchase_packages_given'] : null;
        $this->container['auto_share_packages_required'] = isset($data['auto_share_packages_required']) ? $data['auto_share_packages_required'] : null;
        $this->container['auto_share_packages_given'] = isset($data['auto_share_packages_given']) ? $data['auto_share_packages_given'] : null;
    }

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

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


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

    /**
     * Sets status_code
     * @param int $status_code Error custom status code.
     * @return $this
     */
    public function setStatusCode($status_code)
    {
        $this->container['status_code'] = $status_code;

        return $this;
    }

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

    /**
     * Sets errors
     * @param string[] $errors Validation error.
     * @return $this
     */
    public function setErrors($errors)
    {
        $this->container['errors'] = $errors;

        return $this;
    }

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

    /**
     * Sets purchase_packages_required
     * @param string[] $purchase_packages_required Validation error.
     * @return $this
     */
    public function setPurchasePackagesRequired($purchase_packages_required)
    {
        $this->container['purchase_packages_required'] = $purchase_packages_required;

        return $this;
    }

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

    /**
     * Sets purchase_packages_given
     * @param string[] $purchase_packages_given Validation error.
     * @return $this
     */
    public function setPurchasePackagesGiven($purchase_packages_given)
    {
        $this->container['purchase_packages_given'] = $purchase_packages_given;

        return $this;
    }

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

    /**
     * Sets auto_share_packages_required
     * @param string[] $auto_share_packages_required Validation error.
     * @return $this
     */
    public function setAutoSharePackagesRequired($auto_share_packages_required)
    {
        $this->container['auto_share_packages_required'] = $auto_share_packages_required;

        return $this;
    }

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

    /**
     * Sets auto_share_packages_given
     * @param string[] $auto_share_packages_given Validation error.
     * @return $this
     */
    public function setAutoSharePackagesGiven($auto_share_packages_given)
    {
        $this->container['auto_share_packages_given'] = $auto_share_packages_given;

        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(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
        }

        return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
    }
}


