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

/**
 * Ship
 *
 * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
 *
 * 
 * 
 * Generated by: https://github.com/swagger-api/swagger-codegen.git
 * Swagger Codegen version: 3.0.50
 */
/**
 * 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;

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

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $swaggerTypes = [
        'delivery_confirmation' => '\UPS\Shipping\Shipping\PackageServiceOptionsDeliveryConfirmation',
        'declared_value' => '\UPS\Shipping\Shipping\PackageServiceOptionsDeclaredValue',
        'cod' => '\UPS\Shipping\Shipping\PackageServiceOptionsCOD',
        'access_point_cod' => '\UPS\Shipping\Shipping\PackageServiceOptionsAccessPointCOD',
        'shipper_release_indicator' => 'string',
        'notification' => '\UPS\Shipping\Shipping\PackageServiceOptionsNotification',
        'haz_mat' => '\UPS\Shipping\Shipping\PackageServiceOptionsHazMat[]',
        'dry_ice' => '\UPS\Shipping\Shipping\PackageServiceOptionsDryIce',
        'ups_premium_care_indicator' => 'string',
        'proactive_indicator' => 'string',
        'package_identifier' => 'string',
        'clinical_trials_id' => 'string',
        'refrigeration_indicator' => 'string'
    ];

    /**
      * Array of property to format mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $swaggerFormats = [
        'delivery_confirmation' => null,
        'declared_value' => null,
        'cod' => null,
        'access_point_cod' => null,
        'shipper_release_indicator' => null,
        'notification' => null,
        'haz_mat' => null,
        'dry_ice' => null,
        'ups_premium_care_indicator' => null,
        'proactive_indicator' => null,
        'package_identifier' => null,
        'clinical_trials_id' => null,
        'refrigeration_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 = [
        'delivery_confirmation' => 'DeliveryConfirmation',
        'declared_value' => 'DeclaredValue',
        'cod' => 'COD',
        'access_point_cod' => 'AccessPointCOD',
        'shipper_release_indicator' => 'ShipperReleaseIndicator',
        'notification' => 'Notification',
        'haz_mat' => 'HazMat',
        'dry_ice' => 'DryIce',
        'ups_premium_care_indicator' => 'UPSPremiumCareIndicator',
        'proactive_indicator' => 'ProactiveIndicator',
        'package_identifier' => 'PackageIdentifier',
        'clinical_trials_id' => 'ClinicalTrialsID',
        'refrigeration_indicator' => 'RefrigerationIndicator'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'delivery_confirmation' => 'setDeliveryConfirmation',
        'declared_value' => 'setDeclaredValue',
        'cod' => 'setCod',
        'access_point_cod' => 'setAccessPointCod',
        'shipper_release_indicator' => 'setShipperReleaseIndicator',
        'notification' => 'setNotification',
        'haz_mat' => 'setHazMat',
        'dry_ice' => 'setDryIce',
        'ups_premium_care_indicator' => 'setUpsPremiumCareIndicator',
        'proactive_indicator' => 'setProactiveIndicator',
        'package_identifier' => 'setPackageIdentifier',
        'clinical_trials_id' => 'setClinicalTrialsId',
        'refrigeration_indicator' => 'setRefrigerationIndicator'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'delivery_confirmation' => 'getDeliveryConfirmation',
        'declared_value' => 'getDeclaredValue',
        'cod' => 'getCod',
        'access_point_cod' => 'getAccessPointCod',
        'shipper_release_indicator' => 'getShipperReleaseIndicator',
        'notification' => 'getNotification',
        'haz_mat' => 'getHazMat',
        'dry_ice' => 'getDryIce',
        'ups_premium_care_indicator' => 'getUpsPremiumCareIndicator',
        'proactive_indicator' => 'getProactiveIndicator',
        'package_identifier' => 'getPackageIdentifier',
        'clinical_trials_id' => 'getClinicalTrialsId',
        'refrigeration_indicator' => 'getRefrigerationIndicator'
    ];

    /**
     * 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['delivery_confirmation'] = isset($data['delivery_confirmation']) ? $data['delivery_confirmation'] : null;
        $this->container['declared_value'] = isset($data['declared_value']) ? $data['declared_value'] : null;
        $this->container['cod'] = isset($data['cod']) ? $data['cod'] : null;
        $this->container['access_point_cod'] = isset($data['access_point_cod']) ? $data['access_point_cod'] : null;
        $this->container['shipper_release_indicator'] = isset($data['shipper_release_indicator']) ? $data['shipper_release_indicator'] : null;
        $this->container['notification'] = isset($data['notification']) ? $data['notification'] : null;
        $this->container['haz_mat'] = isset($data['haz_mat']) ? $data['haz_mat'] : null;
        $this->container['dry_ice'] = isset($data['dry_ice']) ? $data['dry_ice'] : null;
        $this->container['ups_premium_care_indicator'] = isset($data['ups_premium_care_indicator']) ? $data['ups_premium_care_indicator'] : null;
        $this->container['proactive_indicator'] = isset($data['proactive_indicator']) ? $data['proactive_indicator'] : null;
        $this->container['package_identifier'] = isset($data['package_identifier']) ? $data['package_identifier'] : null;
        $this->container['clinical_trials_id'] = isset($data['clinical_trials_id']) ? $data['clinical_trials_id'] : null;
        $this->container['refrigeration_indicator'] = isset($data['refrigeration_indicator']) ? $data['refrigeration_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 delivery_confirmation
     *
     * @return \UPS\Shipping\Shipping\PackageServiceOptionsDeliveryConfirmation
     */
    public function getDeliveryConfirmation()
    {
        return $this->container['delivery_confirmation'];
    }

    /**
     * Sets delivery_confirmation
     *
     * @param \UPS\Shipping\Shipping\PackageServiceOptionsDeliveryConfirmation $delivery_confirmation delivery_confirmation
     *
     * @return $this
     */
    public function setDeliveryConfirmation($delivery_confirmation)
    {
        $this->container['delivery_confirmation'] = $delivery_confirmation;

        return $this;
    }

    /**
     * Gets declared_value
     *
     * @return \UPS\Shipping\Shipping\PackageServiceOptionsDeclaredValue
     */
    public function getDeclaredValue()
    {
        return $this->container['declared_value'];
    }

    /**
     * Sets declared_value
     *
     * @param \UPS\Shipping\Shipping\PackageServiceOptionsDeclaredValue $declared_value declared_value
     *
     * @return $this
     */
    public function setDeclaredValue($declared_value)
    {
        $this->container['declared_value'] = $declared_value;

        return $this;
    }

    /**
     * Gets cod
     *
     * @return \UPS\Shipping\Shipping\PackageServiceOptionsCOD
     */
    public function getCod()
    {
        return $this->container['cod'];
    }

    /**
     * Sets cod
     *
     * @param \UPS\Shipping\Shipping\PackageServiceOptionsCOD $cod cod
     *
     * @return $this
     */
    public function setCod($cod)
    {
        $this->container['cod'] = $cod;

        return $this;
    }

    /**
     * Gets access_point_cod
     *
     * @return \UPS\Shipping\Shipping\PackageServiceOptionsAccessPointCOD
     */
    public function getAccessPointCod()
    {
        return $this->container['access_point_cod'];
    }

    /**
     * Sets access_point_cod
     *
     * @param \UPS\Shipping\Shipping\PackageServiceOptionsAccessPointCOD $access_point_cod access_point_cod
     *
     * @return $this
     */
    public function setAccessPointCod($access_point_cod)
    {
        $this->container['access_point_cod'] = $access_point_cod;

        return $this;
    }

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

    /**
     * Sets shipper_release_indicator
     *
     * @param string $shipper_release_indicator The presence indicates that the package may be released by driver without a signature from the consignee.  Empty Tag. Only available for US50/PR to US50/PR packages without return service.
     *
     * @return $this
     */
    public function setShipperReleaseIndicator($shipper_release_indicator)
    {
        $this->container['shipper_release_indicator'] = $shipper_release_indicator;

        return $this;
    }

    /**
     * Gets notification
     *
     * @return \UPS\Shipping\Shipping\PackageServiceOptionsNotification
     */
    public function getNotification()
    {
        return $this->container['notification'];
    }

    /**
     * Sets notification
     *
     * @param \UPS\Shipping\Shipping\PackageServiceOptionsNotification $notification notification
     *
     * @return $this
     */
    public function setNotification($notification)
    {
        $this->container['notification'] = $notification;

        return $this;
    }

    /**
     * Gets haz_mat
     *
     * @return \UPS\Shipping\Shipping\PackageServiceOptionsHazMat[]
     */
    public function getHazMat()
    {
        return $this->container['haz_mat'];
    }

    /**
     * Sets haz_mat
     *
     * @param \UPS\Shipping\Shipping\PackageServiceOptionsHazMat[] $haz_mat haz_mat
     *
     * @return $this
     */
    public function setHazMat($haz_mat)
    {
        $this->container['haz_mat'] = $haz_mat;

        return $this;
    }

    /**
     * Gets dry_ice
     *
     * @return \UPS\Shipping\Shipping\PackageServiceOptionsDryIce
     */
    public function getDryIce()
    {
        return $this->container['dry_ice'];
    }

    /**
     * Sets dry_ice
     *
     * @param \UPS\Shipping\Shipping\PackageServiceOptionsDryIce $dry_ice dry_ice
     *
     * @return $this
     */
    public function setDryIce($dry_ice)
    {
        $this->container['dry_ice'] = $dry_ice;

        return $this;
    }

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

    /**
     * Sets ups_premium_care_indicator
     *
     * @param string $ups_premium_care_indicator An UPSPremiumCareIndicator indicates special handling is required for shipment having controlled substances. Empty Tag means indicator is present.  The UPSPremiumCareIndicator cannot be requested for package with Delivery Confirmation - Adult Signature Required and Delivery Confirmation- Signature Required.  UPSPremiumCareIndicator is valid for following Return services: - Returns Exchange (available with a contract) - Print Return Label - Print and Mail - Electronic Return Label - Return Service Three Attempt  The UPSPremiumCareIndicator can be requested with following UPS services: - UPS Express® Early - UPS Express - UPS Express Saver - UPS Standard - Valid only for Canada to Canada movements.
     *
     * @return $this
     */
    public function setUpsPremiumCareIndicator($ups_premium_care_indicator)
    {
        $this->container['ups_premium_care_indicator'] = $ups_premium_care_indicator;

        return $this;
    }

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

    /**
     * Sets proactive_indicator
     *
     * @param string $proactive_indicator Presence/Absence Indicator. Any value is ignored. If present, the package is rated for UPS Proactive Response and proactive package tracking. Contractual accessorial for health care companies to allow package monitoring throughout the UPS system.  Shippers account needs to have valid contract for UPS Proactive Reponse.
     *
     * @return $this
     */
    public function setProactiveIndicator($proactive_indicator)
    {
        $this->container['proactive_indicator'] = $proactive_indicator;

        return $this;
    }

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

    /**
     * Sets package_identifier
     *
     * @param string $package_identifier Identifies the package containing Dangerous Goods.  Required for Hazmat shipment if SubVersion is greater than or equal to 1701.
     *
     * @return $this
     */
    public function setPackageIdentifier($package_identifier)
    {
        $this->container['package_identifier'] = $package_identifier;

        return $this;
    }

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

    /**
     * Sets clinical_trials_id
     *
     * @param string $clinical_trials_id Unique identifier for clinical trials
     *
     * @return $this
     */
    public function setClinicalTrialsId($clinical_trials_id)
    {
        $this->container['clinical_trials_id'] = $clinical_trials_id;

        return $this;
    }

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

    /**
     * Sets refrigeration_indicator
     *
     * @param string $refrigeration_indicator Presence/Absence Indicator. Any value is ignored. If present, indicates that the package contains an item that needs refrigeration.  Shippers account needs to have a valid contract for Refrigeration.
     *
     * @return $this
     */
    public function setRefrigerationIndicator($refrigeration_indicator)
    {
        $this->container['refrigeration_indicator'] = $refrigeration_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));
    }
}
