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

/**
 * Ship
 *
 * The Shipping Package API gives the application many ways to manage the shipment of packages to their destination. # Reference - <a href=\"https://developer.ups.com/api/reference/shipping/business-rules\" target=\"_blank\" rel=\"noopener\">Business Rules</a> - <a href=\"https://developer.ups.com/api/reference/shipping/appendix1\" target=\"_blank\" rel=\"noopener\">Appendix 1</a> - <a href=\"https://developer.ups.com/api/reference/shipping/appendix2\" target=\"_blank\" rel=\"noopener\">Appendix 2</a> - <a href=\"https://developer.ups.com/api/reference/shipping/errors\" target=\"_blank\" rel=\"noopener\">Errors</a> - <a href=\"https://developer.ups.com/api/reference/shipping/faq\" target=\"_blank\" rel=\"noopener\">FAQ</a> - <a href=\"https://developer.ups.com/api/reference/shipping/best-practices\" target=\"_blank\" rel=\"noopener noreferrer\"> Best Practices</a>  <br/><p>Try out UPS APIs with example requests using Postman. Explore API documentation and sample applications through GitHub.</p>  <a href=\"https://god.gw.postman.com/run-collection/29542085-af2f70b3-405b-4aee-af8d-1eb715e4cebc?action=collection%2Ffork&source=rip_markdown&collection-url=entityId%3D29542085-af2f70b3-405b-4aee-af8d-1eb715e4cebc%26entityType%3Dcollection%26workspaceId%3D7e7595f0-4829-4f9a-aee1-75c126b9d417\" target=\"_blank\" rel=\"noopener noreferrer\">   <img src=\"https://run.pstmn.io/button.svg\" alt=\"Run In Postman\" style=\"width: 128px; height: 32px;\"></a> <a href=\"https://github.com/UPS-API\" target=\"_blank\" rel=\"noopener noreferrer\">   <img src=\"https://www.ups.com/assets/resources/webcontent/images/gitHubButton.svg\" alt=\"Open in GitHub \" style=\"width: 128px; height: 32px;\"> </a>
 *
 * 
 * 
 * Generated by: https://github.com/swagger-api/swagger-codegen.git
 * Swagger Codegen version: 3.0.71
 */
/**
 * 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 UPS\Shipping\Shipping;

use \ArrayAccess;
use \UPS\Shipping\ObjectSerializer;

/**
 * ShipmentServiceOptionsRestrictedArticles Class Doc Comment
 *
 * @category Class
 * @description Restricted Articles container.
 * @package  UPS\Shipping
 * @author   Swagger Codegen team
 * @link     https://github.com/swagger-api/swagger-codegen
 */
class ShipmentServiceOptionsRestrictedArticles implements ModelInterface, ArrayAccess
{
    const DISCRIMINATOR = null;

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $swaggerTypes = [
        'diagnostic_specimens_indicator' => 'string',
        'alcoholic_beverages_indicator' => 'string',
        'perishables_indicator' => 'string',
        'plants_indicator' => 'string',
        'seeds_indicator' => 'string',
        'special_exceptions_indicator' => 'string',
        'tobacco_indicator' => 'string',
        'e_cigarettes_indicator' => 'string'
    ];

    /**
      * Array of property to format mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $swaggerFormats = [
        'diagnostic_specimens_indicator' => null,
        'alcoholic_beverages_indicator' => null,
        'perishables_indicator' => null,
        'plants_indicator' => null,
        'seeds_indicator' => null,
        'special_exceptions_indicator' => null,
        'tobacco_indicator' => null,
        'e_cigarettes_indicator' => 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 = [
        'diagnostic_specimens_indicator' => 'DiagnosticSpecimensIndicator',
        'alcoholic_beverages_indicator' => 'AlcoholicBeveragesIndicator',
        'perishables_indicator' => 'PerishablesIndicator',
        'plants_indicator' => 'PlantsIndicator',
        'seeds_indicator' => 'SeedsIndicator',
        'special_exceptions_indicator' => 'SpecialExceptionsIndicator',
        'tobacco_indicator' => 'TobaccoIndicator',
        'e_cigarettes_indicator' => 'ECigarettesIndicator'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'diagnostic_specimens_indicator' => 'setDiagnosticSpecimensIndicator',
        'alcoholic_beverages_indicator' => 'setAlcoholicBeveragesIndicator',
        'perishables_indicator' => 'setPerishablesIndicator',
        'plants_indicator' => 'setPlantsIndicator',
        'seeds_indicator' => 'setSeedsIndicator',
        'special_exceptions_indicator' => 'setSpecialExceptionsIndicator',
        'tobacco_indicator' => 'setTobaccoIndicator',
        'e_cigarettes_indicator' => 'setECigarettesIndicator'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'diagnostic_specimens_indicator' => 'getDiagnosticSpecimensIndicator',
        'alcoholic_beverages_indicator' => 'getAlcoholicBeveragesIndicator',
        'perishables_indicator' => 'getPerishablesIndicator',
        'plants_indicator' => 'getPlantsIndicator',
        'seeds_indicator' => 'getSeedsIndicator',
        'special_exceptions_indicator' => 'getSpecialExceptionsIndicator',
        'tobacco_indicator' => 'getTobaccoIndicator',
        'e_cigarettes_indicator' => 'getECigarettesIndicator'
    ];

    /**
     * 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['diagnostic_specimens_indicator'] = isset($data['diagnostic_specimens_indicator']) ? $data['diagnostic_specimens_indicator'] : null;
        $this->container['alcoholic_beverages_indicator'] = isset($data['alcoholic_beverages_indicator']) ? $data['alcoholic_beverages_indicator'] : null;
        $this->container['perishables_indicator'] = isset($data['perishables_indicator']) ? $data['perishables_indicator'] : null;
        $this->container['plants_indicator'] = isset($data['plants_indicator']) ? $data['plants_indicator'] : null;
        $this->container['seeds_indicator'] = isset($data['seeds_indicator']) ? $data['seeds_indicator'] : null;
        $this->container['special_exceptions_indicator'] = isset($data['special_exceptions_indicator']) ? $data['special_exceptions_indicator'] : null;
        $this->container['tobacco_indicator'] = isset($data['tobacco_indicator']) ? $data['tobacco_indicator'] : null;
        $this->container['e_cigarettes_indicator'] = isset($data['e_cigarettes_indicator']) ? $data['e_cigarettes_indicator'] : null;
    }

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

        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 diagnostic_specimens_indicator
     *
     * @return string
     */
    public function getDiagnosticSpecimensIndicator()
    {
        return $this->container['diagnostic_specimens_indicator'];
    }

    /**
     * Sets diagnostic_specimens_indicator
     *
     * @param string $diagnostic_specimens_indicator This field is a flag to indicate if the package has Biological substances. True if present; false otherwise.  Shippers account needs to have a valid contract for Biological Substances. Lane check will happen based on postal code/ city.
     *
     * @return $this
     */
    public function setDiagnosticSpecimensIndicator($diagnostic_specimens_indicator)
    {
        $this->container['diagnostic_specimens_indicator'] = $diagnostic_specimens_indicator;

        return $this;
    }

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

    /**
     * Sets alcoholic_beverages_indicator
     *
     * @param string $alcoholic_beverages_indicator Presence/Absence Indicator. True if present; false otherwise. Any value is ignored. If present, indicates that the package contains Alcoholic Beverages  Shippers account needs to have a valid contract for Alcohol.
     *
     * @return $this
     */
    public function setAlcoholicBeveragesIndicator($alcoholic_beverages_indicator)
    {
        $this->container['alcoholic_beverages_indicator'] = $alcoholic_beverages_indicator;

        return $this;
    }

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

    /**
     * Sets perishables_indicator
     *
     * @param string $perishables_indicator Presence/Absence Indicator. True if present; false otherwise. Any value is ignored. If present, indicates that the package contains Perishable items.  Shippers account needs to have a valid contract for Perishables.
     *
     * @return $this
     */
    public function setPerishablesIndicator($perishables_indicator)
    {
        $this->container['perishables_indicator'] = $perishables_indicator;

        return $this;
    }

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

    /**
     * Sets plants_indicator
     *
     * @param string $plants_indicator Presence/Absence Indicator. True if present; false otherwise. Any value is ignored. If present, indicates that the package contains Plants  Shippers account needs to have a valid contract for Plants.
     *
     * @return $this
     */
    public function setPlantsIndicator($plants_indicator)
    {
        $this->container['plants_indicator'] = $plants_indicator;

        return $this;
    }

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

    /**
     * Sets seeds_indicator
     *
     * @param string $seeds_indicator Presence/Absence Indicator. True if present; false otherwise. Any value is ignored. If present, indicates that the package contains Seeds.  Shippers account needs to have a valid contract for Seeds.
     *
     * @return $this
     */
    public function setSeedsIndicator($seeds_indicator)
    {
        $this->container['seeds_indicator'] = $seeds_indicator;

        return $this;
    }

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

    /**
     * Sets special_exceptions_indicator
     *
     * @param string $special_exceptions_indicator Presence/Absence Indicator. True if present; false otherwise. Any value is ignored. If present, indicates that the package contains Special Exception items.  Shippers account needs to have a valid contract for Special Exceptions.
     *
     * @return $this
     */
    public function setSpecialExceptionsIndicator($special_exceptions_indicator)
    {
        $this->container['special_exceptions_indicator'] = $special_exceptions_indicator;

        return $this;
    }

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

    /**
     * Sets tobacco_indicator
     *
     * @param string $tobacco_indicator Presence/Absence Indicator. True if present; false otherwise. Any value is ignored. If present, indicates that the package contains Tobacco  Shippers account needs to have a valid contract for Tobacco.
     *
     * @return $this
     */
    public function setTobaccoIndicator($tobacco_indicator)
    {
        $this->container['tobacco_indicator'] = $tobacco_indicator;

        return $this;
    }

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

    /**
     * Sets e_cigarettes_indicator
     *
     * @param string $e_cigarettes_indicator Presence/Absence Indicator. True if present; false otherwise. Any value is ignored. If present, indicates that the package contains Ecigarettes  Shippers account needs to have a valid contract for Ecigarettes.
     *
     * @return $this
     */
    public function setECigarettesIndicator($e_cigarettes_indicator)
    {
        $this->container['e_cigarettes_indicator'] = $e_cigarettes_indicator;

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