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

/**
 * Labels
 *
 * Contact Us: [USPS API Support](https://emailus.usps.com/s/usps-APIs) | [Terms of Service](https://about.usps.com/termsofuse.htm)  The USPS&#174; Labels API allows you to digitally create mailing labels for the following mail classes: USPS Ground Advantage&#8482;, Parcel Select&#174; Destination Entry, Parcel Select Lightweight&#174;, USPS Connect&#174; Local, USPS Connect&#174; Regional, Priority  Mail&#174;, Priority Mail Express&#174;, Bound Printed Matter, Library Mail, and Media Mail&#174;.  * Use the [Getting Started guide](https://developers.usps.com/getting-started) to get started with the Labels API. * The USPS&#174; Labels API uses a token to authorize the use of an [Enterprise Payment](https://postalpro.usps.com/EPS) or Permit account. The specification to generate the token is in the [Payments 3.0 - Set Payment Account Information](https://developers.usps.com/paymentsv3#tag/Resources/operation/post-payments-payment-authorization).  **Manifest Scheduling**   The following table outlines the Domestic Label manifesting schedule for specific conditions listed below.   | Condition                   | Scheduling | | ----------------------------| -------- | | **Customs Forms labels**    | 12:30am CT on the day after label creation. | | **Return labels**    | 12:30am CT on the day after label creation. | | **Smart Locker labels**     | Electronic data is sent to Postal systems within 15 minutes of label creation. | | **Value of `true` provided for `immediateManifest` field**| Electronic data is sent to Postal systems within 15 minutes of label creation.  | | **Label is added to a [SCAN Form](https://developers.usps.com/scanv3#tag/Resources/operation/post-scan-form)**| Electronic data is sent to Postal systems within 15 minutes of SCAN Form creation.  | | **All other conditions**    | 12:30am CT after the `mailingDate` value provided by the user |
 *
 * OpenAPI spec version: 3.9.9
 * 
 * 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 USPS\Labels\Model;
use \USPS\Labels\ObjectSerializer;

/**
 * BaseDomesticPackageDescription Class Doc Comment
 *
 * @category Class
 * @package  USPS\Labels
 * @author   Swagger Codegen team
 * @link     https://github.com/swagger-api/swagger-codegen
 */
class BaseDomesticPackageDescription extends PackageDescription 
{
    const DISCRIMINATOR = null;

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $swaggerTypes = [
        'mail_class' => 'string',
        'processing_category' => 'string',
        'destination_entry_facility_type' => 'string',
        'destination_entry_facility_address' => '\USPS\Labels\Model\DomesticAddress',
        'package_options' => '',
        'customer_reference' => '\USPS\Labels\Model\DomesticCustomerReference[]',
        'extra_services' => '\USPS\Labels\Model\ExtraService[]',
        'mailing_date' => 'string',
        'carrier_release' => 'bool',
        'physical_signature_required' => 'bool',
        'induction_zip_code' => '\USPS\Labels\Model\InductionZIPCode',
        'shipper_visibility_method' => 'string',
        'mail_owner_mid' => 'string',
        'logistics_manager_mid' => 'string'
    ];

    /**
      * Array of property to format mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $swaggerFormats = [
        'mail_class' => null,
        'processing_category' => null,
        'destination_entry_facility_type' => null,
        'destination_entry_facility_address' => null,
        'package_options' => null,
        'customer_reference' => null,
        'extra_services' => null,
        'mailing_date' => null,
        'carrier_release' => null,
        'physical_signature_required' => null,
        'induction_zip_code' => null,
        'shipper_visibility_method' => null,
        'mail_owner_mid' => null,
        'logistics_manager_mid' => null
    ];

    /**
     * Array of property to type mappings. Used for (de)serialization
     *
     * @return array
     */
    public static function swaggerTypes()
    {
        return self::$swaggerTypes + parent::swaggerTypes();
    }

    /**
     * Array of property to format mappings. Used for (de)serialization
     *
     * @return array
     */
    public static function swaggerFormats()
    {
        return self::$swaggerFormats + parent::swaggerFormats();
    }

    /**
     * Array of attributes where the key is the local name,
     * and the value is the original name
     *
     * @var string[]
     */
    protected static $attributeMap = [
        'mail_class' => 'mailClass',
        'processing_category' => 'processingCategory',
        'destination_entry_facility_type' => 'destinationEntryFacilityType',
        'destination_entry_facility_address' => 'destinationEntryFacilityAddress',
        'package_options' => 'packageOptions',
        'customer_reference' => 'customerReference',
        'extra_services' => 'extraServices',
        'mailing_date' => 'mailingDate',
        'carrier_release' => 'carrierRelease',
        'physical_signature_required' => 'physicalSignatureRequired',
        'induction_zip_code' => 'inductionZIPCode',
        'shipper_visibility_method' => 'shipperVisibilityMethod',
        'mail_owner_mid' => 'mailOwnerMID',
        'logistics_manager_mid' => 'logisticsManagerMID'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'mail_class' => 'setMailClass',
        'processing_category' => 'setProcessingCategory',
        'destination_entry_facility_type' => 'setDestinationEntryFacilityType',
        'destination_entry_facility_address' => 'setDestinationEntryFacilityAddress',
        'package_options' => 'setPackageOptions',
        'customer_reference' => 'setCustomerReference',
        'extra_services' => 'setExtraServices',
        'mailing_date' => 'setMailingDate',
        'carrier_release' => 'setCarrierRelease',
        'physical_signature_required' => 'setPhysicalSignatureRequired',
        'induction_zip_code' => 'setInductionZipCode',
        'shipper_visibility_method' => 'setShipperVisibilityMethod',
        'mail_owner_mid' => 'setMailOwnerMid',
        'logistics_manager_mid' => 'setLogisticsManagerMid'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'mail_class' => 'getMailClass',
        'processing_category' => 'getProcessingCategory',
        'destination_entry_facility_type' => 'getDestinationEntryFacilityType',
        'destination_entry_facility_address' => 'getDestinationEntryFacilityAddress',
        'package_options' => 'getPackageOptions',
        'customer_reference' => 'getCustomerReference',
        'extra_services' => 'getExtraServices',
        'mailing_date' => 'getMailingDate',
        'carrier_release' => 'getCarrierRelease',
        'physical_signature_required' => 'getPhysicalSignatureRequired',
        'induction_zip_code' => 'getInductionZipCode',
        'shipper_visibility_method' => 'getShipperVisibilityMethod',
        'mail_owner_mid' => 'getMailOwnerMid',
        'logistics_manager_mid' => 'getLogisticsManagerMid'
    ];

    /**
     * Array of attributes where the key is the local name,
     * and the value is the original name
     *
     * @return array
     */
    public static function attributeMap()
    {
        return parent::attributeMap() + self::$attributeMap;
    }

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @return array
     */
    public static function setters()
    {
        return parent::setters() + self::$setters;
    }

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @return array
     */
    public static function getters()
    {
        return parent::getters() + self::$getters;
    }

    /**
     * The original name of the model.
     *
     * @return string
     */
    public function getModelName()
    {
        return self::$swaggerModelName;
    }

    const MAIL_CLASS_PARCEL_SELECT = 'PARCEL_SELECT';
    const MAIL_CLASS_PARCEL_SELECT_LIGHTWEIGHT = 'PARCEL_SELECT_LIGHTWEIGHT';
    const MAIL_CLASS_USPS_CONNECT_LOCAL = 'USPS_CONNECT_LOCAL';
    const MAIL_CLASS_USPS_CONNECT_REGIONAL = 'USPS_CONNECT_REGIONAL';
    const MAIL_CLASS_USPS_CONNECT_MAIL = 'USPS_CONNECT_MAIL';
    const MAIL_CLASS_USPS_GROUND_ADVANTAGE = 'USPS_GROUND_ADVANTAGE';
    const MAIL_CLASS_PRIORITY_MAIL_EXPRESS = 'PRIORITY_MAIL_EXPRESS';
    const MAIL_CLASS_PRIORITY_MAIL = 'PRIORITY_MAIL';
    const MAIL_CLASS_FIRST_CLASS_PACKAGE_SERVICE = 'FIRST-CLASS_PACKAGE_SERVICE';
    const MAIL_CLASS_LIBRARY_MAIL = 'LIBRARY_MAIL';
    const MAIL_CLASS_MEDIA_MAIL = 'MEDIA_MAIL';
    const MAIL_CLASS_BOUND_PRINTED_MATTER = 'BOUND_PRINTED_MATTER';
    const PROCESSING_CATEGORY_LETTERS = 'LETTERS';
    const PROCESSING_CATEGORY_FLATS = 'FLATS';
    const PROCESSING_CATEGORY_MACHINABLE = 'MACHINABLE';
    const PROCESSING_CATEGORY_IRREGULAR = 'IRREGULAR';
    const PROCESSING_CATEGORY_NON_MACHINABLE = 'NON_MACHINABLE';
    const PROCESSING_CATEGORY_NONSTANDARD = 'NONSTANDARD';
    const DESTINATION_ENTRY_FACILITY_TYPE_NONE = 'NONE';
    const DESTINATION_ENTRY_FACILITY_TYPE_DESTINATION_NETWORK_DISTRIBUTION_CENTER = 'DESTINATION_NETWORK_DISTRIBUTION_CENTER';
    const DESTINATION_ENTRY_FACILITY_TYPE_DESTINATION_SECTIONAL_CENTER_FACILITY = 'DESTINATION_SECTIONAL_CENTER_FACILITY';
    const DESTINATION_ENTRY_FACILITY_TYPE_DESTINATION_DELIVERY_UNIT = 'DESTINATION_DELIVERY_UNIT';
    const DESTINATION_ENTRY_FACILITY_TYPE_DESTINATION_SERVICE_HUB = 'DESTINATION_SERVICE_HUB';
    const DESTINATION_ENTRY_FACILITY_TYPE_DESTINATION_REGIONAL_PROCESSING_DISTRIBUTION_CENTER = 'DESTINATION_REGIONAL_PROCESSING_DISTRIBUTION_CENTER';
    const SHIPPER_VISIBILITY_METHOD_SENDER_INFORMATION = 'SENDER_INFORMATION';
    const SHIPPER_VISIBILITY_METHOD_MID_INFORMATION = 'MID_INFORMATION';

    /**
     * Gets allowable values of the enum
     *
     * @return string[]
     */
    public function getMailClassAllowableValues()
    {
        return [
            self::MAIL_CLASS_PARCEL_SELECT,
            self::MAIL_CLASS_PARCEL_SELECT_LIGHTWEIGHT,
            self::MAIL_CLASS_USPS_CONNECT_LOCAL,
            self::MAIL_CLASS_USPS_CONNECT_REGIONAL,
            self::MAIL_CLASS_USPS_CONNECT_MAIL,
            self::MAIL_CLASS_USPS_GROUND_ADVANTAGE,
            self::MAIL_CLASS_PRIORITY_MAIL_EXPRESS,
            self::MAIL_CLASS_PRIORITY_MAIL,
            self::MAIL_CLASS_FIRST_CLASS_PACKAGE_SERVICE,
            self::MAIL_CLASS_LIBRARY_MAIL,
            self::MAIL_CLASS_MEDIA_MAIL,
            self::MAIL_CLASS_BOUND_PRINTED_MATTER,
        ];
    }
    /**
     * Gets allowable values of the enum
     *
     * @return string[]
     */
    public function getProcessingCategoryAllowableValues()
    {
        return [
            self::PROCESSING_CATEGORY_LETTERS,
            self::PROCESSING_CATEGORY_FLATS,
            self::PROCESSING_CATEGORY_MACHINABLE,
            self::PROCESSING_CATEGORY_IRREGULAR,
            self::PROCESSING_CATEGORY_NON_MACHINABLE,
            self::PROCESSING_CATEGORY_NONSTANDARD,
        ];
    }
    /**
     * Gets allowable values of the enum
     *
     * @return string[]
     */
    public function getDestinationEntryFacilityTypeAllowableValues()
    {
        return [
            self::DESTINATION_ENTRY_FACILITY_TYPE_NONE,
            self::DESTINATION_ENTRY_FACILITY_TYPE_DESTINATION_NETWORK_DISTRIBUTION_CENTER,
            self::DESTINATION_ENTRY_FACILITY_TYPE_DESTINATION_SECTIONAL_CENTER_FACILITY,
            self::DESTINATION_ENTRY_FACILITY_TYPE_DESTINATION_DELIVERY_UNIT,
            self::DESTINATION_ENTRY_FACILITY_TYPE_DESTINATION_SERVICE_HUB,
            self::DESTINATION_ENTRY_FACILITY_TYPE_DESTINATION_REGIONAL_PROCESSING_DISTRIBUTION_CENTER,
        ];
    }
    /**
     * Gets allowable values of the enum
     *
     * @return string[]
     */
    public function getShipperVisibilityMethodAllowableValues()
    {
        return [
            self::SHIPPER_VISIBILITY_METHOD_SENDER_INFORMATION,
            self::SHIPPER_VISIBILITY_METHOD_MID_INFORMATION,
        ];
    }


    /**
     * Constructor
     *
     * @param mixed[] $data Associated array of property values
     *                      initializing the model
     */
    public function __construct(array $data = null)
    {
        parent::__construct($data);

        $this->container['mail_class'] = isset($data['mail_class']) ? $data['mail_class'] : null;
        $this->container['processing_category'] = isset($data['processing_category']) ? $data['processing_category'] : null;
        $this->container['destination_entry_facility_type'] = isset($data['destination_entry_facility_type']) ? $data['destination_entry_facility_type'] : null;
        $this->container['destination_entry_facility_address'] = isset($data['destination_entry_facility_address']) ? $data['destination_entry_facility_address'] : null;
        $this->container['package_options'] = isset($data['package_options']) ? $data['package_options'] : null;
        $this->container['customer_reference'] = isset($data['customer_reference']) ? $data['customer_reference'] : null;
        $this->container['extra_services'] = isset($data['extra_services']) ? $data['extra_services'] : null;
        $this->container['mailing_date'] = isset($data['mailing_date']) ? $data['mailing_date'] : null;
        $this->container['carrier_release'] = isset($data['carrier_release']) ? $data['carrier_release'] : null;
        $this->container['physical_signature_required'] = isset($data['physical_signature_required']) ? $data['physical_signature_required'] : null;
        $this->container['induction_zip_code'] = isset($data['induction_zip_code']) ? $data['induction_zip_code'] : null;
        $this->container['shipper_visibility_method'] = isset($data['shipper_visibility_method']) ? $data['shipper_visibility_method'] : null;
        $this->container['mail_owner_mid'] = isset($data['mail_owner_mid']) ? $data['mail_owner_mid'] : null;
        $this->container['logistics_manager_mid'] = isset($data['logistics_manager_mid']) ? $data['logistics_manager_mid'] : null;
    }

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

        if ($this->container['mail_class'] === null) {
            $invalidProperties[] = "'mail_class' can't be null";
        }
        $allowedValues = $this->getMailClassAllowableValues();
        if (!is_null($this->container['mail_class']) && !in_array($this->container['mail_class'], $allowedValues, true)) {
            $invalidProperties[] = sprintf(
                "invalid value for 'mail_class', must be one of '%s'",
                implode("', '", $allowedValues)
            );
        }

        if ($this->container['processing_category'] === null) {
            $invalidProperties[] = "'processing_category' can't be null";
        }
        $allowedValues = $this->getProcessingCategoryAllowableValues();
        if (!is_null($this->container['processing_category']) && !in_array($this->container['processing_category'], $allowedValues, true)) {
            $invalidProperties[] = sprintf(
                "invalid value for 'processing_category', must be one of '%s'",
                implode("', '", $allowedValues)
            );
        }

        if ($this->container['destination_entry_facility_type'] === null) {
            $invalidProperties[] = "'destination_entry_facility_type' can't be null";
        }
        $allowedValues = $this->getDestinationEntryFacilityTypeAllowableValues();
        if (!is_null($this->container['destination_entry_facility_type']) && !in_array($this->container['destination_entry_facility_type'], $allowedValues, true)) {
            $invalidProperties[] = sprintf(
                "invalid value for 'destination_entry_facility_type', must be one of '%s'",
                implode("', '", $allowedValues)
            );
        }

        if ($this->container['mailing_date'] === null) {
            $invalidProperties[] = "'mailing_date' can't be null";
        }
        $allowedValues = $this->getShipperVisibilityMethodAllowableValues();
        if (!is_null($this->container['shipper_visibility_method']) && !in_array($this->container['shipper_visibility_method'], $allowedValues, true)) {
            $invalidProperties[] = sprintf(
                "invalid value for 'shipper_visibility_method', must be one of '%s'",
                implode("', '", $allowedValues)
            );
        }

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

    /**
     * Sets mail_class
     *
     * @param string $mail_class Mail classes for label  Note: - `PARCEL_SELECT` with a `destinationEntryFacilityType` of `NONE` will convert to `USPS_GROUND_ADVANTAGE` - `PARCEL_SELECT_LIGHTWEIGHT` is deprecated and will convert to `PARCEL_SELECT` - `FIRST-CLASS_PACKAGE_SERVICE` is deprecated and will convert to `USPS_GROUND_ADVANTAGE`
     *
     * @return $this
     */
    public function setMailClass($mail_class)
    {
        $allowedValues = $this->getMailClassAllowableValues();
        if (!in_array($mail_class, $allowedValues, true)) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Invalid value for 'mail_class', must be one of '%s'",
                    implode("', '", $allowedValues)
                )
            );
        }
        $this->container['mail_class'] = $mail_class;

        return $this;
    }

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

    /**
     * Sets processing_category
     *
     * @param string $processing_category Value designates if shipment is `MACHINABLE`, `NONSTANDARD`, `LETTERS`, or `FLATS`.  Note: * When requesting the mail class `USPS_CONNECT_MAIL`, users are required to use a processing category of `FLATS`. * The processing category `LETTERS` is only valid for mail classes `PRIORITY_MAIL` and `PRIORITY_MAIL_EXPRESS` for outbound shipments. * The processing category `FLATS` is not valid for mail class `USPS_GROUND_ADVANTAGE`. * `IRREGULAR` is deprecated and will convert to `NONSTANDARD` as of 01/19/2025. * `NON_MACHINABLE` is deprecated and will convert to `NONSTANDARD` as of 01/19/2025.
     *
     * @return $this
     */
    public function setProcessingCategory($processing_category)
    {
        $allowedValues = $this->getProcessingCategoryAllowableValues();
        if (!in_array($processing_category, $allowedValues, true)) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Invalid value for 'processing_category', must be one of '%s'",
                    implode("', '", $allowedValues)
                )
            );
        }
        $this->container['processing_category'] = $processing_category;

        return $this;
    }

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

    /**
     * Sets destination_entry_facility_type
     *
     * @param string $destination_entry_facility_type Types of Facilities: * `NONE` - Translate to Destination Rate Indicator N * `DESTINATION_NETWORK_DISTRIBUTION_CENTER` - Translate to Destination Rate Indicator B * `DESTINATION_SECTIONAL_CENTER_FACILITY` - Translate to Destination Rate Indicator S * `DESTINATION_DELIVERY_UNIT` - Translate to Destination Rate Indicator D * `DESTINATION_SERVICE_HUB` - Translate to Destination Rate Indicator H * `DESTINATION_REGIONAL_PROCESSING_DISTRIBUTION_CENTER` - Translate to Destination Rate Indicator B  Note: * If any value other than `NONE` is selected, a destinationEntryFacilityAddress is required. * The destinationEntryFacilityAddress must be a valid facility to drop your package * The destination entry facility type must be set to `NONE` when there is a value provided for the 'inductionZipCode' field * Effective 01/19/2025: `DESTINATION_DELIVERY_UNIT` is the only valid enumeration when using the 'USPS_CONNECT_MAIL' mail class * Effective 01/18/2026: `DESTINATION_NETWORK_DISTRIBUTION_CENTER` with `PARCEL_SELECT` is no longer eligible. * Effective 01/18/2026: (NSA Only) `DESTINATION_REGIONAL_PROCESSING_DISTRIBUTION_CENTER` with `PARCEL_SELECT` is available as an option.
     *
     * @return $this
     */
    public function setDestinationEntryFacilityType($destination_entry_facility_type)
    {
        $allowedValues = $this->getDestinationEntryFacilityTypeAllowableValues();
        if (!in_array($destination_entry_facility_type, $allowedValues, true)) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Invalid value for 'destination_entry_facility_type', must be one of '%s'",
                    implode("', '", $allowedValues)
                )
            );
        }
        $this->container['destination_entry_facility_type'] = $destination_entry_facility_type;

        return $this;
    }

    /**
     * Gets destination_entry_facility_address
     *
     * @return \USPS\Labels\Model\DomesticAddress
     */
    public function getDestinationEntryFacilityAddress()
    {
        return $this->container['destination_entry_facility_address'];
    }

    /**
     * Sets destination_entry_facility_address
     *
     * @param \USPS\Labels\Model\DomesticAddress $destination_entry_facility_address destination_entry_facility_address
     *
     * @return $this
     */
    public function setDestinationEntryFacilityAddress($destination_entry_facility_address)
    {
        $this->container['destination_entry_facility_address'] = $destination_entry_facility_address;

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Gets customer_reference
     *
     * @return \USPS\Labels\Model\DomesticCustomerReference[]
     */
    public function getCustomerReference()
    {
        return $this->container['customer_reference'];
    }

    /**
     * Sets customer_reference
     *
     * @param \USPS\Labels\Model\DomesticCustomerReference[] $customer_reference Used for shippers to print a value on a label and included in the Shipping Services File (SSF).  Note:  * Customer Reference #3-4 are only supported with label types `4X5LABEL`, `4X6LABEL`, and `6X4LABEL`.  * Customer Reference #3-4 cannot be used with a customs form.  * Customer Reference #3-4 will not be added to the SSF.  * Customer Reference will not display with `imageInfo.brandingImageFormat` value of `RECTANGLE`.  * When Customer Reference #4 is provided with a Destination Entry Facility, the Drop-Off Location will not be displayed on the label.
     *
     * @return $this
     */
    public function setCustomerReference($customer_reference)
    {
        $this->container['customer_reference'] = $customer_reference;

        return $this;
    }

    /**
     * Gets extra_services
     *
     * @return \USPS\Labels\Model\ExtraService[]
     */
    public function getExtraServices()
    {
        return $this->container['extra_services'];
    }

    /**
     * Sets extra_services
     *
     * @param \USPS\Labels\Model\ExtraService[] $extra_services Extra Service Code requested. * 365 - Global Direct Entry * 415 - USPS Label Delivery * 480 - Tracking Plus 6 Months * 481 - Tracking Plus 1 Year * 482 - Tracking Plus 3 Years * 483 - Tracking Plus 5 Years * 484 - Tracking Plus 7 Years * 485 - Tracking Plus 10 Years * 486 - Tracking Plus Signature 3 Years * 487 - Tracking Plus Signature 5 Years * 488 - Tracking Plus Signature 7 Years * 489 - Tracking Plus Signature 10 Years * 810 - HAZMAT Air Eligible Ethanol Package * 811 - HAZMAT Class 1 - Toy Propellant/Safety Fuse Package * 812 - HAZMAT Class 3 – Flammable Liquid Package * 813 - HAZMAT Class 7 - Radioactive Materials Package * 814 - HAZMAT Class 8 - Corrosive Materials Package * 815 - HAZMAT Class 8 - Nonspillable Wet Battery Package * 816 - HAZMAT Class 9 - Lithium Battery Marked - Ground Only Package * 817 - HAZMAT Class 9 - Lithium Battery - Returns Package * 818 - HAZMAT Class 9 - Lithium batteries, marked package * 819 - HAZMAT Class 9 - Dry Ice Package * 820 - HAZMAT Class 9 - Lithium batteries, unmarked package * 821 - HAZMAT Class 9 - Magnetized Materials Package * 822 - HAZMAT Division 4.1 – Flammable Solids or Safety Matches Package * 823 - HAZMAT Division 5.1 - Oxidizers Package * 824 - HAZMAT Division 5.2 - Organic Peroxides Package * 825 - HAZMAT Division 6.1 – Toxic Materials Package * 826 - HAZMAT Division 6.2 – Infectious Substances Package * 827 - HAZMAT Excepted Quantity Provision Package * 828 - HAZMAT Ground Only * 829 - HAZMAT ID8000 Consumer Commodity Package * 830 - HAZMAT Lighters Package * 831 - HAZMAT LTD QTY Ground Package * 832 - HAZMAT Small Quantity Provision Package * 857 - Hazardous Material * 910 - Certified Mail * 911 - Certified Mail Restricted Delivery * 912 - Certified Mail Adult Signature Required * 913 - Certified Mail Adult Signature Restricted Delivery * 920 - USPS Tracking * 921 - Signature Confirmation * 922 - Adult Signature Required 21 or Over * 923 - Adult Signature Restricted Delivery 21 or Over * 924 - Signature Confirmation Restricted Delivery * 925 - Priority Mail Express Merchandise Insurance * 930 - Insurance <= $500 * 931 - Insurance > $500 * 934 - Insurance Restricted Delivery * 955 - Return Receipt * 957 - Return Receipt Electronic * 981 - Signature Requested (PRIORITY_MAIL_EXPRESS only) * 986 - PO to Addressee (PRIORITY_MAIL_EXPRESS only) * 991 - Sunday Delivery  Note: * When the extra service code \"930\" is provided in the request, if the item value is over $500, \"930\" will automatically be replaced with \"931\" - Insurance (Greater than $500). * USPS Label Delivery (Print and Deliver, extra service code \"415\"): When requesting this service, no images will be returned in the API response. The label and receipt will be printed and mailed to the `fromAddress` provided. The mailed label will always include a receipt on the page. This service is not available at all locations. * Some service codes require a combination with extra services such as \"955\" and \"957\". For all valid combinations, visit [https://postalpro.usps.com/IMPB_Service_Type_Codes](https://postalpro.usps.com/IMPB_Service_Type_Codes).
     *
     * @return $this
     */
    public function setExtraServices($extra_services)
    {
        $this->container['extra_services'] = $extra_services;

        return $this;
    }

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

    /**
     * Sets mailing_date
     *
     * @param string $mailing_date The date on which the package will be mailed. If the time is not provided, it will be defaulted to 10:00 p.m.
     *
     * @return $this
     */
    public function setMailingDate($mailing_date)
    {
        $this->container['mailing_date'] = $mailing_date;

        return $this;
    }

    /**
     * Gets carrier_release
     *
     * @return bool
     */
    public function getCarrierRelease()
    {
        return $this->container['carrier_release'];
    }

    /**
     * Sets carrier_release
     *
     * @param bool $carrier_release Indicates whether recipients authorize a carrier to leave a shipment if no one is available to receive it at the time of delivery. Priority Mail Express&#174; shipments or items requiring a signature at delivery are not eligible (e.g. Signature Confirmation, Insurance > $500).  Note:  * Carrier release is currently not supported when 'holdForPickup' is set to true  * Carrier Release is currently not supported with mail class values of 'PRIORITY_MAIL', 'PRIORITY_MAIL_EXPRESS', or 'USPS_GROUND_ADVANTAGE'  * Carrier Release is currently not supported with 'extraServices' 910, 911, 912, 913, 921, 922, 923, 924, 925, 930, 931, 934, 955, or 981
     *
     * @return $this
     */
    public function setCarrierRelease($carrier_release)
    {
        $this->container['carrier_release'] = $carrier_release;

        return $this;
    }

    /**
     * Gets physical_signature_required
     *
     * @return bool
     */
    public function getPhysicalSignatureRequired()
    {
        return $this->container['physical_signature_required'];
    }

    /**
     * Sets physical_signature_required
     *
     * @param bool $physical_signature_required Indicates the method for the signature that will be used when signing for the package. For customers that are not specifically requiring a physical signature upon delivery, the \"SIGNATURE_REQUIRED\" option will indicate that the package is eligible for both an electronic signature online or a physical signature. For more information regarding USPS Electronic Signature Online (USPS eSOL) eligibility, please visit: https://faq.usps.com/s/article/USPS-Electronic-Signature-Online. For all mail classes, excluding Priority Mail Express, the default value is \"SIGNATURE_REQUIRED\". A value of \"SIGNATURE_WAIVED\" will not require the customer to sign for the package. \"SIGNATURE_WAIVED\" is only eligible for Priority Mail Express packages and is the default value. The 'carrierRelease' option is not eligible to be used in conjunction with 'signatureType'. The 'physicalSignatureRequired' field is required to include signature extra service code values such as 910, 911, 912, 913, 921, 922, 923, 924, 925, 931, 934, 955, 981 or an extraServiceCode value of 930 with a packageValue greater than 500.
     *
     * @return $this
     */
    public function setPhysicalSignatureRequired($physical_signature_required)
    {
        $this->container['physical_signature_required'] = $physical_signature_required;

        return $this;
    }

    /**
     * Gets induction_zip_code
     *
     * @return \USPS\Labels\Model\InductionZIPCode
     */
    public function getInductionZipCode()
    {
        return $this->container['induction_zip_code'];
    }

    /**
     * Sets induction_zip_code
     *
     * @param \USPS\Labels\Model\InductionZIPCode $induction_zip_code induction_zip_code
     *
     * @return $this
     */
    public function setInductionZipCode($induction_zip_code)
    {
        $this->container['induction_zip_code'] = $induction_zip_code;

        return $this;
    }

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

    /**
     * Sets shipper_visibility_method
     *
     * @param string $shipper_visibility_method When generating labels for a third party shipper the label provider must capture and provide contact details of the individual or entity to whom they provide the label. There are two methods for reporting shipper information to USPS:  1. The label provider creates a unique USPS Mailer ID (MID) using the name, validated address, phone, and email contact information of each shipper. When using this method the Mailer ID should be submitted in the MID field in the LABEL_OWNER role when generating the payment authorization token and this field should be populated with 'MID_INFORMATION'  2. An alternative method allows for the label provider to assign a unique alphanumeric value known as a platformUserId to each shipper and to report the platformUserId together with the required shipper contact details. When using this method the shipper contact details are required in the `senderAddress` object (including `streetAddress`, `city`, `state`, `ZIPCode`, `phone`, `email`, `platformUserId` & `firstName`/`lastName` or `firm`) and this field should be populated with 'SENDER_INFORMATION'.
     *
     * @return $this
     */
    public function setShipperVisibilityMethod($shipper_visibility_method)
    {
        $allowedValues = $this->getShipperVisibilityMethodAllowableValues();
        if (!is_null($shipper_visibility_method) && !in_array($shipper_visibility_method, $allowedValues, true)) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Invalid value for 'shipper_visibility_method', must be one of '%s'",
                    implode("', '", $allowedValues)
                )
            );
        }
        $this->container['shipper_visibility_method'] = $shipper_visibility_method;

        return $this;
    }

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

    /**
     * Sets mail_owner_mid
     *
     * @param string $mail_owner_mid This is the mailer ID associated with the mail owner for this label This provides an additional copy of the scan extract file to the MID's outbound folder.
     *
     * @return $this
     */
    public function setMailOwnerMid($mail_owner_mid)
    {
        $this->container['mail_owner_mid'] = $mail_owner_mid;

        return $this;
    }

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

    /**
     * Sets logistics_manager_mid
     *
     * @param string $logistics_manager_mid This is the mailer ID associated with the logistics manager for this label This provides an additional copy of the scan extract file to the MID's outbound folder.
     *
     * @return $this
     */
    public function setLogisticsManagerMid($logistics_manager_mid)
    {
        $this->container['logistics_manager_mid'] = $logistics_manager_mid;

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