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

/**
 * PublicationValidationError 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 PublicationValidationError implements ArrayAccess
{
    /**
      * The original name of the model.
      * @var string
      */
    protected static $swaggerModelName = 'PublicationValidationError';

    /**
      * Array of property to type mappings. Used for (de)serialization
      * @var string[]
      */
    protected static $swaggerTypes = array(
        'license_name' => 'string',
        'license_type' => 'string',
        'allow_listed' => 'string',
        'price' => 'string',
        'allow_bundled' => 'string',
        'upgrades' => 'string',
        'label' => 'string',
        'publication_error' => 'string',
        'publication_license_does_not_exist_error' => 'string',
        'not_allow_to_bundle_error' => 'string',
        'license_compatibility_error' => 'string',
        'draft_version_dependency_error' => 'string',
        'version_not_published_error' => 'string',
        'downstream_publication_license_error' => '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(
        'license_name' => 'license_name',
        'license_type' => 'license_type',
        'allow_listed' => 'allow_listed',
        'price' => 'price',
        'allow_bundled' => 'allow_bundled',
        'upgrades' => 'upgrades',
        'label' => 'label',
        'publication_error' => 'publication_error',
        'publication_license_does_not_exist_error' => 'publication_license_does_not_exist_error',
        'not_allow_to_bundle_error' => 'not_allow_to_bundle_error',
        'license_compatibility_error' => 'license_compatibility_error',
        'draft_version_dependency_error' => 'draft_version_dependency_error',
        'version_not_published_error' => 'version_not_published_error',
        'downstream_publication_license_error' => 'downstream_publication_license_error'
    );

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

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     * @var string[]
     */
    protected static $setters = array(
        'license_name' => 'setLicenseName',
        'license_type' => 'setLicenseType',
        'allow_listed' => 'setAllowListed',
        'price' => 'setPrice',
        'allow_bundled' => 'setAllowBundled',
        'upgrades' => 'setUpgrades',
        'label' => 'setLabel',
        'publication_error' => 'setPublicationError',
        'publication_license_does_not_exist_error' => 'setPublicationLicenseDoesNotExistError',
        'not_allow_to_bundle_error' => 'setNotAllowToBundleError',
        'license_compatibility_error' => 'setLicenseCompatibilityError',
        'draft_version_dependency_error' => 'setDraftVersionDependencyError',
        'version_not_published_error' => 'setVersionNotPublishedError',
        'downstream_publication_license_error' => 'setDownstreamPublicationLicenseError'
    );

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

    /**
     * Array of attributes to getter functions (for serialization of requests)
     * @var string[]
     */
    protected static $getters = array(
        'license_name' => 'getLicenseName',
        'license_type' => 'getLicenseType',
        'allow_listed' => 'getAllowListed',
        'price' => 'getPrice',
        'allow_bundled' => 'getAllowBundled',
        'upgrades' => 'getUpgrades',
        'label' => 'getLabel',
        'publication_error' => 'getPublicationError',
        'publication_license_does_not_exist_error' => 'getPublicationLicenseDoesNotExistError',
        'not_allow_to_bundle_error' => 'getNotAllowToBundleError',
        'license_compatibility_error' => 'getLicenseCompatibilityError',
        'draft_version_dependency_error' => 'getDraftVersionDependencyError',
        'version_not_published_error' => 'getVersionNotPublishedError',
        'downstream_publication_license_error' => 'getDownstreamPublicationLicenseError'
    );

    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['license_name'] = isset($data['license_name']) ? $data['license_name'] : null;
        $this->container['license_type'] = isset($data['license_type']) ? $data['license_type'] : null;
        $this->container['allow_listed'] = isset($data['allow_listed']) ? $data['allow_listed'] : null;
        $this->container['price'] = isset($data['price']) ? $data['price'] : null;
        $this->container['allow_bundled'] = isset($data['allow_bundled']) ? $data['allow_bundled'] : null;
        $this->container['upgrades'] = isset($data['upgrades']) ? $data['upgrades'] : null;
        $this->container['label'] = isset($data['label']) ? $data['label'] : null;
        $this->container['publication_error'] = isset($data['publication_error']) ? $data['publication_error'] : null;
        $this->container['publication_license_does_not_exist_error'] = isset($data['publication_license_does_not_exist_error']) ? $data['publication_license_does_not_exist_error'] : null;
        $this->container['not_allow_to_bundle_error'] = isset($data['not_allow_to_bundle_error']) ? $data['not_allow_to_bundle_error'] : null;
        $this->container['license_compatibility_error'] = isset($data['license_compatibility_error']) ? $data['license_compatibility_error'] : null;
        $this->container['draft_version_dependency_error'] = isset($data['draft_version_dependency_error']) ? $data['draft_version_dependency_error'] : null;
        $this->container['version_not_published_error'] = isset($data['version_not_published_error']) ? $data['version_not_published_error'] : null;
        $this->container['downstream_publication_license_error'] = isset($data['downstream_publication_license_error']) ? $data['downstream_publication_license_error'] : 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 license_name
     * @return string
     */
    public function getLicenseName()
    {
        return $this->container['license_name'];
    }

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

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


