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

/**
 * Locator
 *
 * 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\Locator\Locator;

use \ArrayAccess;
use \UPS\Locator\ObjectSerializer;

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

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $swaggerTypes = [
        'day' => 'string',
        'open_hours' => 'string',
        'close_hours' => 'string',
        'latest_drop_off_hours' => 'string',
        'prep_hours' => 'string',
        'closed_indicator' => 'string',
        'open24_hours_indicator' => 'string'
    ];

    /**
      * Array of property to format mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $swaggerFormats = [
        'day' => null,
        'open_hours' => null,
        'close_hours' => null,
        'latest_drop_off_hours' => null,
        'prep_hours' => null,
        'closed_indicator' => null,
        'open24_hours_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 = [
        'day' => 'Day',
        'open_hours' => 'OpenHours',
        'close_hours' => 'CloseHours',
        'latest_drop_off_hours' => 'LatestDropOffHours',
        'prep_hours' => 'PrepHours',
        'closed_indicator' => 'ClosedIndicator',
        'open24_hours_indicator' => 'Open24HoursIndicator'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'day' => 'setDay',
        'open_hours' => 'setOpenHours',
        'close_hours' => 'setCloseHours',
        'latest_drop_off_hours' => 'setLatestDropOffHours',
        'prep_hours' => 'setPrepHours',
        'closed_indicator' => 'setClosedIndicator',
        'open24_hours_indicator' => 'setOpen24HoursIndicator'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'day' => 'getDay',
        'open_hours' => 'getOpenHours',
        'close_hours' => 'getCloseHours',
        'latest_drop_off_hours' => 'getLatestDropOffHours',
        'prep_hours' => 'getPrepHours',
        'closed_indicator' => 'getClosedIndicator',
        'open24_hours_indicator' => 'getOpen24HoursIndicator'
    ];

    /**
     * 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['day'] = isset($data['day']) ? $data['day'] : null;
        $this->container['open_hours'] = isset($data['open_hours']) ? $data['open_hours'] : null;
        $this->container['close_hours'] = isset($data['close_hours']) ? $data['close_hours'] : null;
        $this->container['latest_drop_off_hours'] = isset($data['latest_drop_off_hours']) ? $data['latest_drop_off_hours'] : null;
        $this->container['prep_hours'] = isset($data['prep_hours']) ? $data['prep_hours'] : null;
        $this->container['closed_indicator'] = isset($data['closed_indicator']) ? $data['closed_indicator'] : null;
        $this->container['open24_hours_indicator'] = isset($data['open24_hours_indicator']) ? $data['open24_hours_indicator'] : null;
    }

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

        if ($this->container['day'] === null) {
            $invalidProperties[] = "'day' can't be null";
        }
        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 day
     *
     * @return string
     */
    public function getDay()
    {
        return $this->container['day'];
    }

    /**
     * Sets day
     *
     * @param string $day Day of week.  Valid values:  1-Sunday 2-Monday 3-Tuesday 4-Wednesday 5-Thursday 6-Friday 7-Saturday.
     *
     * @return $this
     */
    public function setDay($day)
    {
        $this->container['day'] = $day;

        return $this;
    }

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

    /**
     * Sets open_hours
     *
     * @param string $open_hours Open time of a location in military format (HHMM) e.g. 930, 1700, 1845 etc. with exception for midnight. For midnight the time will be returned as 0.
     *
     * @return $this
     */
    public function setOpenHours($open_hours)
    {
        $this->container['open_hours'] = $open_hours;

        return $this;
    }

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

    /**
     * Sets close_hours
     *
     * @param string $close_hours Close time of a location in military format (HHMM) e.g. 930, 1700, 1845 etc. with exception for midnight. For midnight the time will be returned as 0.
     *
     * @return $this
     */
    public function setCloseHours($close_hours)
    {
        $this->container['close_hours'] = $close_hours;

        return $this;
    }

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

    /**
     * Sets latest_drop_off_hours
     *
     * @param string $latest_drop_off_hours LatestDropOffHours for Hour Type 50. Latest Drop Off time of a location in military format (HHMM) e.g. 930, 1700, 1845 etc. with exception for midnight. For midnight the time will be returned as 0.
     *
     * @return $this
     */
    public function setLatestDropOffHours($latest_drop_off_hours)
    {
        $this->container['latest_drop_off_hours'] = $latest_drop_off_hours;

        return $this;
    }

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

    /**
     * Sets prep_hours
     *
     * @param string $prep_hours PrepHours for Hour Type 51. Prep Hours of a location in military format (HHMM) e.g. 930, 1700, 1845 etc. with exception for midnight. For midnight the time will be returned as 0.
     *
     * @return $this
     */
    public function setPrepHours($prep_hours)
    {
        $this->container['prep_hours'] = $prep_hours;

        return $this;
    }

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

    /**
     * Sets closed_indicator
     *
     * @param string $closed_indicator Presence absence Indicator. Indicator present means location is closed.
     *
     * @return $this
     */
    public function setClosedIndicator($closed_indicator)
    {
        $this->container['closed_indicator'] = $closed_indicator;

        return $this;
    }

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

    /**
     * Sets open24_hours_indicator
     *
     * @param string $open24_hours_indicator Presence/ Absence Indicator. Presence denotes  for the given day, if the location is open 24 hours. Absence denotes the location is not open for 24 hours on the given day.
     *
     * @return $this
     */
    public function setOpen24HoursIndicator($open24_hours_indicator)
    {
        $this->container['open24_hours_indicator'] = $open24_hours_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));
    }
}
