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

/**
 * Quantum View
 *
 * 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\QuantumView\QuantumView;

use \ArrayAccess;
use \UPS\QuantumView\ObjectSerializer;

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

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $swaggerTypes = [
        'activity' => '\UPS\QuantumView\QuantumView\PackageActivity[]',
        'description' => 'string',
        'dimensions' => '\UPS\QuantumView\QuantumView\PackageDimensions',
        'dimensional_weight' => '\UPS\QuantumView\QuantumView\PackageDimensionalWeight',
        'package_weight' => '\UPS\QuantumView\QuantumView\PackagePackageWeight',
        'large_package' => 'string',
        'tracking_number' => 'string',
        'reference_number' => '\UPS\QuantumView\QuantumView\PackageReferenceNumber[]',
        'package_service_options' => '\UPS\QuantumView\QuantumView\PackagePackageServiceOptions',
        'ups_premium_care_indicator' => 'string'
    ];

    /**
      * Array of property to format mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $swaggerFormats = [
        'activity' => null,
        'description' => null,
        'dimensions' => null,
        'dimensional_weight' => null,
        'package_weight' => null,
        'large_package' => null,
        'tracking_number' => null,
        'reference_number' => null,
        'package_service_options' => null,
        'ups_premium_care_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 = [
        'activity' => 'Activity',
        'description' => 'Description',
        'dimensions' => 'Dimensions',
        'dimensional_weight' => 'DimensionalWeight',
        'package_weight' => 'PackageWeight',
        'large_package' => 'LargePackage',
        'tracking_number' => 'TrackingNumber',
        'reference_number' => 'ReferenceNumber',
        'package_service_options' => 'PackageServiceOptions',
        'ups_premium_care_indicator' => 'UPSPremiumCareIndicator'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'activity' => 'setActivity',
        'description' => 'setDescription',
        'dimensions' => 'setDimensions',
        'dimensional_weight' => 'setDimensionalWeight',
        'package_weight' => 'setPackageWeight',
        'large_package' => 'setLargePackage',
        'tracking_number' => 'setTrackingNumber',
        'reference_number' => 'setReferenceNumber',
        'package_service_options' => 'setPackageServiceOptions',
        'ups_premium_care_indicator' => 'setUpsPremiumCareIndicator'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'activity' => 'getActivity',
        'description' => 'getDescription',
        'dimensions' => 'getDimensions',
        'dimensional_weight' => 'getDimensionalWeight',
        'package_weight' => 'getPackageWeight',
        'large_package' => 'getLargePackage',
        'tracking_number' => 'getTrackingNumber',
        'reference_number' => 'getReferenceNumber',
        'package_service_options' => 'getPackageServiceOptions',
        'ups_premium_care_indicator' => 'getUpsPremiumCareIndicator'
    ];

    /**
     * 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['activity'] = isset($data['activity']) ? $data['activity'] : null;
        $this->container['description'] = isset($data['description']) ? $data['description'] : null;
        $this->container['dimensions'] = isset($data['dimensions']) ? $data['dimensions'] : null;
        $this->container['dimensional_weight'] = isset($data['dimensional_weight']) ? $data['dimensional_weight'] : null;
        $this->container['package_weight'] = isset($data['package_weight']) ? $data['package_weight'] : null;
        $this->container['large_package'] = isset($data['large_package']) ? $data['large_package'] : null;
        $this->container['tracking_number'] = isset($data['tracking_number']) ? $data['tracking_number'] : null;
        $this->container['reference_number'] = isset($data['reference_number']) ? $data['reference_number'] : null;
        $this->container['package_service_options'] = isset($data['package_service_options']) ? $data['package_service_options'] : null;
        $this->container['ups_premium_care_indicator'] = isset($data['ups_premium_care_indicator']) ? $data['ups_premium_care_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 activity
     *
     * @return \UPS\QuantumView\QuantumView\PackageActivity[]
     */
    public function getActivity()
    {
        return $this->container['activity'];
    }

    /**
     * Sets activity
     *
     * @param \UPS\QuantumView\QuantumView\PackageActivity[] $activity Information about package delivery activity.  **NOTE:** For versions >= v2, this element will always be returned as an array. For requests using version = v1, this element will be returned as an array if there is more than one object and a single object if there is only 1.
     *
     * @return $this
     */
    public function setActivity($activity)
    {
        $this->container['activity'] = $activity;

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Gets dimensions
     *
     * @return \UPS\QuantumView\QuantumView\PackageDimensions
     */
    public function getDimensions()
    {
        return $this->container['dimensions'];
    }

    /**
     * Sets dimensions
     *
     * @param \UPS\QuantumView\QuantumView\PackageDimensions $dimensions dimensions
     *
     * @return $this
     */
    public function setDimensions($dimensions)
    {
        $this->container['dimensions'] = $dimensions;

        return $this;
    }

    /**
     * Gets dimensional_weight
     *
     * @return \UPS\QuantumView\QuantumView\PackageDimensionalWeight
     */
    public function getDimensionalWeight()
    {
        return $this->container['dimensional_weight'];
    }

    /**
     * Sets dimensional_weight
     *
     * @param \UPS\QuantumView\QuantumView\PackageDimensionalWeight $dimensional_weight dimensional_weight
     *
     * @return $this
     */
    public function setDimensionalWeight($dimensional_weight)
    {
        $this->container['dimensional_weight'] = $dimensional_weight;

        return $this;
    }

    /**
     * Gets package_weight
     *
     * @return \UPS\QuantumView\QuantumView\PackagePackageWeight
     */
    public function getPackageWeight()
    {
        return $this->container['package_weight'];
    }

    /**
     * Sets package_weight
     *
     * @param \UPS\QuantumView\QuantumView\PackagePackageWeight $package_weight package_weight
     *
     * @return $this
     */
    public function setPackageWeight($package_weight)
    {
        $this->container['package_weight'] = $package_weight;

        return $this;
    }

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

    /**
     * Sets large_package
     *
     * @param string $large_package Values for LargePackage are: - 1 - Oversize 1 - 2 - Oversize 2 - 4 - Large package
     *
     * @return $this
     */
    public function setLargePackage($large_package)
    {
        $this->container['large_package'] = $large_package;

        return $this;
    }

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

    /**
     * Sets tracking_number
     *
     * @param string $tracking_number Package's tracking number.
     *
     * @return $this
     */
    public function setTrackingNumber($tracking_number)
    {
        $this->container['tracking_number'] = $tracking_number;

        return $this;
    }

    /**
     * Gets reference_number
     *
     * @return \UPS\QuantumView\QuantumView\PackageReferenceNumber[]
     */
    public function getReferenceNumber()
    {
        return $this->container['reference_number'];
    }

    /**
     * Sets reference_number
     *
     * @param \UPS\QuantumView\QuantumView\PackageReferenceNumber[] $reference_number Container tag for information about the package-level reference number.  **NOTE:** For versions >= v2, this element will always be returned as an array. For requests using version = v1, this element will be returned as an array if there is more than one object and a single object if there is only 1.
     *
     * @return $this
     */
    public function setReferenceNumber($reference_number)
    {
        $this->container['reference_number'] = $reference_number;

        return $this;
    }

    /**
     * Gets package_service_options
     *
     * @return \UPS\QuantumView\QuantumView\PackagePackageServiceOptions
     */
    public function getPackageServiceOptions()
    {
        return $this->container['package_service_options'];
    }

    /**
     * Sets package_service_options
     *
     * @param \UPS\QuantumView\QuantumView\PackagePackageServiceOptions $package_service_options package_service_options
     *
     * @return $this
     */
    public function setPackageServiceOptions($package_service_options)
    {
        $this->container['package_service_options'] = $package_service_options;

        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 Presence of the tag indicates UPSPremiumCare applies to this package
     *
     * @return $this
     */
    public function setUpsPremiumCareIndicator($ups_premium_care_indicator)
    {
        $this->container['ups_premium_care_indicator'] = $ups_premium_care_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));
    }
}
