<?php
/**
 * ImageInfo
 *
 * 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 \ArrayAccess;
use \USPS\Labels\ObjectSerializer;

/**
 * ImageInfo Class Doc Comment
 *
 * @category Class
 * @description Additional details used to determine how to generate the label image.
 * @package  USPS\Labels
 * @author   Swagger Codegen team
 * @link     https://github.com/swagger-api/swagger-codegen
 */
class ImageInfo implements ModelInterface, ArrayAccess
{
    const DISCRIMINATOR = null;

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $swaggerTypes = [
        'image_type' => 'string',
        'label_type' => 'string',
        'ship_info' => 'bool',
        'receipt_option' => 'string',
        'branding_image_format' => 'string',
        'branding_image_uuids' => 'string[]',
        'include_label_broker_pdf' => 'bool',
        'add_zpl_comments' => 'bool',
        'add_image_comments' => 'bool'
    ];

    /**
      * Array of property to format mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $swaggerFormats = [
        'image_type' => null,
        'label_type' => null,
        'ship_info' => null,
        'receipt_option' => null,
        'branding_image_format' => null,
        'branding_image_uuids' => null,
        'include_label_broker_pdf' => null,
        'add_zpl_comments' => null,
        'add_image_comments' => 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 = [
        'image_type' => 'imageType',
        'label_type' => 'labelType',
        'ship_info' => 'shipInfo',
        'receipt_option' => 'receiptOption',
        'branding_image_format' => 'brandingImageFormat',
        'branding_image_uuids' => 'brandingImageUUIDs',
        'include_label_broker_pdf' => 'includeLabelBrokerPDF',
        'add_zpl_comments' => 'addZPLComments',
        'add_image_comments' => 'addImageComments'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'image_type' => 'setImageType',
        'label_type' => 'setLabelType',
        'ship_info' => 'setShipInfo',
        'receipt_option' => 'setReceiptOption',
        'branding_image_format' => 'setBrandingImageFormat',
        'branding_image_uuids' => 'setBrandingImageUuids',
        'include_label_broker_pdf' => 'setIncludeLabelBrokerPdf',
        'add_zpl_comments' => 'setAddZplComments',
        'add_image_comments' => 'setAddImageComments'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'image_type' => 'getImageType',
        'label_type' => 'getLabelType',
        'ship_info' => 'getShipInfo',
        'receipt_option' => 'getReceiptOption',
        'branding_image_format' => 'getBrandingImageFormat',
        'branding_image_uuids' => 'getBrandingImageUuids',
        'include_label_broker_pdf' => 'getIncludeLabelBrokerPdf',
        'add_zpl_comments' => 'getAddZplComments',
        'add_image_comments' => 'getAddImageComments'
    ];

    /**
     * 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;
    }

    const IMAGE_TYPE_PDF = 'PDF';
    const IMAGE_TYPE_TIFF = 'TIFF';
    const IMAGE_TYPE_JPG = 'JPG';
    const IMAGE_TYPE_PNG = 'PNG';
    const IMAGE_TYPE_GIF = 'GIF';
    const IMAGE_TYPE_SVG = 'SVG';
    const IMAGE_TYPE_ZPL203_DPI = 'ZPL203DPI';
    const IMAGE_TYPE_ZPL300_DPI = 'ZPL300DPI';
    const IMAGE_TYPE_LABEL_BROKER = 'LABEL_BROKER';
    const IMAGE_TYPE_NONE = 'NONE';
    const LABEL_TYPE__4_X4_LABEL = '4X4LABEL';
    const LABEL_TYPE__4_X5_LABEL = '4X5LABEL';
    const LABEL_TYPE__4_X6_LABEL = '4X6LABEL';
    const LABEL_TYPE__6_X4_LABEL = '6X4LABEL';
    const LABEL_TYPE__2_X7_LABEL = '2X7LABEL';
    const RECEIPT_OPTION_SAME_PAGE = 'SAME_PAGE';
    const RECEIPT_OPTION_SEPARATE_PAGE = 'SEPARATE_PAGE';
    const RECEIPT_OPTION_NONE = 'NONE';
    const BRANDING_IMAGE_FORMAT_ONE_SQUARE = 'ONE_SQUARE';
    const BRANDING_IMAGE_FORMAT_TWO_SQUARES = 'TWO_SQUARES';
    const BRANDING_IMAGE_FORMAT_RECTANGLE = 'RECTANGLE';
    const BRANDING_IMAGE_FORMAT_NONE = 'NONE';

    /**
     * Gets allowable values of the enum
     *
     * @return string[]
     */
    public function getImageTypeAllowableValues()
    {
        return [
            self::IMAGE_TYPE_PDF,
            self::IMAGE_TYPE_TIFF,
            self::IMAGE_TYPE_JPG,
            self::IMAGE_TYPE_PNG,
            self::IMAGE_TYPE_GIF,
            self::IMAGE_TYPE_SVG,
            self::IMAGE_TYPE_ZPL203_DPI,
            self::IMAGE_TYPE_ZPL300_DPI,
            self::IMAGE_TYPE_LABEL_BROKER,
            self::IMAGE_TYPE_NONE,
        ];
    }
    /**
     * Gets allowable values of the enum
     *
     * @return string[]
     */
    public function getLabelTypeAllowableValues()
    {
        return [
            self::LABEL_TYPE__4_X4_LABEL,
            self::LABEL_TYPE__4_X5_LABEL,
            self::LABEL_TYPE__4_X6_LABEL,
            self::LABEL_TYPE__6_X4_LABEL,
            self::LABEL_TYPE__2_X7_LABEL,
        ];
    }
    /**
     * Gets allowable values of the enum
     *
     * @return string[]
     */
    public function getReceiptOptionAllowableValues()
    {
        return [
            self::RECEIPT_OPTION_SAME_PAGE,
            self::RECEIPT_OPTION_SEPARATE_PAGE,
            self::RECEIPT_OPTION_NONE,
        ];
    }
    /**
     * Gets allowable values of the enum
     *
     * @return string[]
     */
    public function getBrandingImageFormatAllowableValues()
    {
        return [
            self::BRANDING_IMAGE_FORMAT_ONE_SQUARE,
            self::BRANDING_IMAGE_FORMAT_TWO_SQUARES,
            self::BRANDING_IMAGE_FORMAT_RECTANGLE,
            self::BRANDING_IMAGE_FORMAT_NONE,
        ];
    }

    /**
     * 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['image_type'] = isset($data['image_type']) ? $data['image_type'] : 'PDF';
        $this->container['label_type'] = isset($data['label_type']) ? $data['label_type'] : '4X6LABEL';
        $this->container['ship_info'] = isset($data['ship_info']) ? $data['ship_info'] : null;
        $this->container['receipt_option'] = isset($data['receipt_option']) ? $data['receipt_option'] : 'SAME_PAGE';
        $this->container['branding_image_format'] = isset($data['branding_image_format']) ? $data['branding_image_format'] : 'NONE';
        $this->container['branding_image_uuids'] = isset($data['branding_image_uuids']) ? $data['branding_image_uuids'] : null;
        $this->container['include_label_broker_pdf'] = isset($data['include_label_broker_pdf']) ? $data['include_label_broker_pdf'] : false;
        $this->container['add_zpl_comments'] = isset($data['add_zpl_comments']) ? $data['add_zpl_comments'] : false;
        $this->container['add_image_comments'] = isset($data['add_image_comments']) ? $data['add_image_comments'] : false;
    }

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

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

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

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

        $allowedValues = $this->getBrandingImageFormatAllowableValues();
        if (!is_null($this->container['branding_image_format']) && !in_array($this->container['branding_image_format'], $allowedValues, true)) {
            $invalidProperties[] = sprintf(
                "invalid value for 'branding_image_format', 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 image_type
     *
     * @return string
     */
    public function getImageType()
    {
        return $this->container['image_type'];
    }

    /**
     * Sets image_type
     *
     * @param string $image_type The type of label image requested.  If omitted then the default image type is PDF. * 'PDF' * 'TIFF' * 'JPG' * 'PNG' * 'GIF' * 'SVG' * 'ZPL203DPI' * 'ZPL300DPI' * 'LABEL_BROKER' - Request a USPS QR code to allow your customers with no access to a printer to print at participating Post Office Locations. All USPS API users and third-party integrators utilizing QR codes are subject to the [Label Broker terms and conditions](https://www.usps.com/terms-conditions/label-broker.htm). For more information please see the Label Broker guide available on [GitHub](https://github.com/USPS/api-examples/blob/main/USPS%20APIs%20Domestic%20Labels%20API%20Documentation_2023_0901%20Published.pdf) (Note: Only supports labelType of '4X6LABEL' or '6X4LABEL' and receiptOption of 'NONE').  A USPS Label Broker QR code image will be returned in the API response instead of a label image. * 'NONE'  Note: - Labels with customs forms only support formats of `PDF`, `TIFF`, `ZPL203DPI`, `ZPL300DPI`, `LABEL_BROKER`, and `NONE`. - Including Extra Service Code `415 - USPS Label Delivery` returns no images and is equivalent to requesting `NONE`.
     *
     * @return $this
     */
    public function setImageType($image_type)
    {
        $allowedValues = $this->getImageTypeAllowableValues();
        if (!is_null($image_type) && !in_array($image_type, $allowedValues, true)) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Invalid value for 'image_type', must be one of '%s'",
                    implode("', '", $allowedValues)
                )
            );
        }
        $this->container['image_type'] = $image_type;

        return $this;
    }

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

    /**
     * Sets label_type
     *
     * @param string $label_type Ability to select the label image size.  If omitted then the default label size is `4X6LABEL`.  Note:   * Currently, customs forms only support `4X6LABEL`.   * The `labelType` of `2X7LABEL` is not supported with the `imageType` of `ZPL203DPI` or `ZPL300DPI`.
     *
     * @return $this
     */
    public function setLabelType($label_type)
    {
        $allowedValues = $this->getLabelTypeAllowableValues();
        if (!is_null($label_type) && !in_array($label_type, $allowedValues, true)) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Invalid value for 'label_type', must be one of '%s'",
                    implode("', '", $allowedValues)
                )
            );
        }
        $this->container['label_type'] = $label_type;

        return $this;
    }

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

    /**
     * Sets ship_info
     *
     * @param bool $ship_info indicates if revenue protection information is printed on the label. (true or false)
     *
     * @return $this
     */
    public function setShipInfo($ship_info)
    {
        $this->container['ship_info'] = $ship_info;

        return $this;
    }

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

    /**
     * Sets receipt_option
     *
     * @param string $receipt_option Label & Receipt print out options: Enter `SAME_PAGE` to print the Label and the Receipt on a single page. Enter `SEPARATE_PAGE` to print the Label and the Receipt on separate pages. Enter `NONE` to print the Label only and no Receipt.  Note:   * The `labelType` of `4X4LABEL` or `6X4LABEL` with the image `imageType` of `ZPL203DPI` or `ZPL300DPI` does not support a `receiptOption` of `SEPARATE_PAGE`.   * When `imageType` is `ZPL203DPI` or `ZPL300DPI`, a `receiptOption` of `SAME_PAGE` is not supported.   * When `imageType` is `ZPL203DPI` or `ZPL300DPI` and `receiptOption` is `SEPARATE_PAGE`, the receipt will be returned as an additional label segment within the single ZPL payload in `labelImage`. In this case, `receiptImage` will not be populated.
     *
     * @return $this
     */
    public function setReceiptOption($receipt_option)
    {
        $allowedValues = $this->getReceiptOptionAllowableValues();
        if (!is_null($receipt_option) && !in_array($receipt_option, $allowedValues, true)) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Invalid value for 'receipt_option', must be one of '%s'",
                    implode("', '", $allowedValues)
                )
            );
        }
        $this->container['receipt_option'] = $receipt_option;

        return $this;
    }

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

    /**
     * Sets branding_image_format
     *
     * @param string $branding_image_format The format of label branding images to be shown on the generated label image.  Note: * Label branding images will not be shown on labels with customs forms. * Label branding images are not currently supported with an `imageType` of `ZPL203DPI` or `ZPL300DPI`. * Label branding images are not currently supported with a `labelType` of `4X4LABEL`. * When a `brandingImageFormat` is provided with a Destination Entry Facility, the Drop-Off Location will not be displayed on the label. * When a `brandingImageFormat` of `RECTANGLE` is provided, Customer Reference #3-#4 cannot be provided since they will not be shown. * When a `brandingImageFormat` of `ONE_SQUARE` or `TWO_SQUARES` is provided, Customer Reference numbers will be shifted to the right to accommodate the image. * When a `brandingImageFormat` of `RECTANGLE` is provided, Customer Reference numbers, package number, and total packages will not be displayed on the label. * A `brandingImageFormat` of `ONE_SQUARE` is currently only supported with `labelType` of `4X6LABEL`, `4X5LABEL`, `6X4LABEL`, and `2X7LABEL` for both outbound and return labels. * A `brandingImageFormat` of `TWO_SQUARES` is currently only supported with `labelType` of `4X6LABEL`, `4X5LABEL`, and `6X4LABEL` for both outbound and return labels. * A `brandingImageFormat` of `RECTANGLE` is currently only supported with `labelType` of `4X6LABEL`, `4X5LABEL`, and `6X4LABEL` for outbound labels and `4X5LABEL` and `6X4LABEL` for return labels.
     *
     * @return $this
     */
    public function setBrandingImageFormat($branding_image_format)
    {
        $allowedValues = $this->getBrandingImageFormatAllowableValues();
        if (!is_null($branding_image_format) && !in_array($branding_image_format, $allowedValues, true)) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Invalid value for 'branding_image_format', must be one of '%s'",
                    implode("', '", $allowedValues)
                )
            );
        }
        $this->container['branding_image_format'] = $branding_image_format;

        return $this;
    }

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

    /**
     * Sets branding_image_uuids
     *
     * @param string[] $branding_image_uuids The UUIDs associated with custom images uploaded in the Logo Branding endpoint: /branding  Note: * These UUIDs must have been created with the same Payment Authorization Label Owner CRID in use when creating the label * When using `ONE_SQUARE` or `RECTANGLE` the brandingImageUUIDs list should include only one imageUUID string. * When using `TWO_SQUARES` the brandingImageUUIDs list should include only two imageUUID strings.
     *
     * @return $this
     */
    public function setBrandingImageUuids($branding_image_uuids)
    {
        $this->container['branding_image_uuids'] = $branding_image_uuids;

        return $this;
    }

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

    /**
     * Sets include_label_broker_pdf
     *
     * @param bool $include_label_broker_pdf Applicable only when `imageType` is `LABEL_BROKER`. When `includeLabelBrokerPDF` is `true`, two label images will be returned in the multi-part and vendor response as `labelBrokerQR` and `labelImage`. `labelBrokerQR` will contain the base64 PNG of the Label Broker QR Code and `labelImage` will contain the base64 PDF of the Label stored in Label Broker. When `includeLabelBrokerPDF` is `false`, one image will be returned in the multi-part and vendor response as `labelImage` as the base64 PNG of the Label Broker QR Code.
     *
     * @return $this
     */
    public function setIncludeLabelBrokerPdf($include_label_broker_pdf)
    {
        $this->container['include_label_broker_pdf'] = $include_label_broker_pdf;

        return $this;
    }

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

    /**
     * Sets add_zpl_comments
     *
     * @param bool $add_zpl_comments Note: This field has been deprecated in favor of `addImageComments`.  Applicable only when `imageType` is `ZPL203DPI` or `ZPL300DPI`.  When `addZPLComments` is `true`, comments will be visible within the ZPL text response to the user to denote different sections of their label.  When `addZPLComments` is `false`, no comments will be included in the ZPL text response.  This will be ignored for any other `imageType`.  Example of a ZPL comment:  `^FX Start of label. 123e4567-e89b-12d3-a456-426614174000 ^FS`
     *
     * @return $this
     */
    public function setAddZplComments($add_zpl_comments)
    {
        $this->container['add_zpl_comments'] = $add_zpl_comments;

        return $this;
    }

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

    /**
     * Sets add_image_comments
     *
     * @param bool $add_image_comments Applicable only when `imageType` is `ZPL203DPI` or `ZPL300DPI`.  When `addImageComments` is `true`, comments will be visible within the ZPL text response to the user to denote different sections of their label.  When `addImageComments` is `false`, no comments will be included in the ZPL text response.  This will be ignored for any other `imageType`. Example of a ZPL comment: `^FX Start of label. 123e4567-e89b-12d3-a456-426614174000 ^FS`
     *
     * @return $this
     */
    public function setAddImageComments($add_image_comments)
    {
        $this->container['add_image_comments'] = $add_image_comments;

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