<?php
/**
 * TemplateSummaryDiffLabelMappings
 *
 * PHP version 5
 *
 * @category Class
 * @package  InfluxDB2
 * @author   OpenAPI Generator team
 * @link     https://openapi-generator.tech
 */

/**
 * InfluxDB OSS API Service
 *
 * The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
 *
 * OpenAPI spec version: 2.0.0
 * 
 * Generated by: https://openapi-generator.tech
 * OpenAPI Generator version: 3.3.4
 */

/**
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

namespace InfluxDB2\Model;

use \ArrayAccess;
use \InfluxDB2\ObjectSerializer;

/**
 * TemplateSummaryDiffLabelMappings Class Doc Comment
 *
 * @category Class
 * @package  InfluxDB2
 * @author   OpenAPI Generator team
 * @link     https://openapi-generator.tech
 */
class TemplateSummaryDiffLabelMappings implements ModelInterface, ArrayAccess
{
    const DISCRIMINATOR = null;

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $openAPITypes = [
        'status' => 'string',
        'resource_type' => 'string',
        'resource_id' => 'string',
        'resource_template_meta_name' => 'string',
        'resource_name' => 'string',
        'label_id' => 'string',
        'label_template_meta_name' => 'string',
        'label_name' => 'string'
    ];

    /**
      * Array of property to format mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $openAPIFormats = [
        'status' => null,
        'resource_type' => null,
        'resource_id' => null,
        'resource_template_meta_name' => null,
        'resource_name' => null,
        'label_id' => null,
        'label_template_meta_name' => null,
        'label_name' => null
    ];

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

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

    /**
     * Array of attributes where the key is the local name,
     * and the value is the original name
     *
     * @var string[]
     */
    protected static $attributeMap = [
        'status' => 'status',
        'resource_type' => 'resourceType',
        'resource_id' => 'resourceID',
        'resource_template_meta_name' => 'resourceTemplateMetaName',
        'resource_name' => 'resourceName',
        'label_id' => 'labelID',
        'label_template_meta_name' => 'labelTemplateMetaName',
        'label_name' => 'labelName'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'status' => 'setStatus',
        'resource_type' => 'setResourceType',
        'resource_id' => 'setResourceId',
        'resource_template_meta_name' => 'setResourceTemplateMetaName',
        'resource_name' => 'setResourceName',
        'label_id' => 'setLabelId',
        'label_template_meta_name' => 'setLabelTemplateMetaName',
        'label_name' => 'setLabelName'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'status' => 'getStatus',
        'resource_type' => 'getResourceType',
        'resource_id' => 'getResourceId',
        'resource_template_meta_name' => 'getResourceTemplateMetaName',
        'resource_name' => 'getResourceName',
        'label_id' => 'getLabelId',
        'label_template_meta_name' => 'getLabelTemplateMetaName',
        'label_name' => 'getLabelName'
    ];

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

    

    

    /**
     * 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['status'] = isset($data['status']) ? $data['status'] : null;
        $this->container['resource_type'] = isset($data['resource_type']) ? $data['resource_type'] : null;
        $this->container['resource_id'] = isset($data['resource_id']) ? $data['resource_id'] : null;
        $this->container['resource_template_meta_name'] = isset($data['resource_template_meta_name']) ? $data['resource_template_meta_name'] : null;
        $this->container['resource_name'] = isset($data['resource_name']) ? $data['resource_name'] : null;
        $this->container['label_id'] = isset($data['label_id']) ? $data['label_id'] : null;
        $this->container['label_template_meta_name'] = isset($data['label_template_meta_name']) ? $data['label_template_meta_name'] : null;
        $this->container['label_name'] = isset($data['label_name']) ? $data['label_name'] : 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 status
     *
     * @return string|null
     */
    public function getStatus()
    {
        return $this->container['status'];
    }

    /**
     * Sets status
     *
     * @param string|null $status status
     *
     * @return $this
     */
    public function setStatus($status)
    {
        $this->container['status'] = $status;

        return $this;
    }

    /**
     * Gets resource_type
     *
     * @return string|null
     */
    public function getResourceType()
    {
        return $this->container['resource_type'];
    }

    /**
     * Sets resource_type
     *
     * @param string|null $resource_type resource_type
     *
     * @return $this
     */
    public function setResourceType($resource_type)
    {
        $this->container['resource_type'] = $resource_type;

        return $this;
    }

    /**
     * Gets resource_id
     *
     * @return string|null
     */
    public function getResourceId()
    {
        return $this->container['resource_id'];
    }

    /**
     * Sets resource_id
     *
     * @param string|null $resource_id resource_id
     *
     * @return $this
     */
    public function setResourceId($resource_id)
    {
        $this->container['resource_id'] = $resource_id;

        return $this;
    }

    /**
     * Gets resource_template_meta_name
     *
     * @return string|null
     */
    public function getResourceTemplateMetaName()
    {
        return $this->container['resource_template_meta_name'];
    }

    /**
     * Sets resource_template_meta_name
     *
     * @param string|null $resource_template_meta_name resource_template_meta_name
     *
     * @return $this
     */
    public function setResourceTemplateMetaName($resource_template_meta_name)
    {
        $this->container['resource_template_meta_name'] = $resource_template_meta_name;

        return $this;
    }

    /**
     * Gets resource_name
     *
     * @return string|null
     */
    public function getResourceName()
    {
        return $this->container['resource_name'];
    }

    /**
     * Sets resource_name
     *
     * @param string|null $resource_name resource_name
     *
     * @return $this
     */
    public function setResourceName($resource_name)
    {
        $this->container['resource_name'] = $resource_name;

        return $this;
    }

    /**
     * Gets label_id
     *
     * @return string|null
     */
    public function getLabelId()
    {
        return $this->container['label_id'];
    }

    /**
     * Sets label_id
     *
     * @param string|null $label_id label_id
     *
     * @return $this
     */
    public function setLabelId($label_id)
    {
        $this->container['label_id'] = $label_id;

        return $this;
    }

    /**
     * Gets label_template_meta_name
     *
     * @return string|null
     */
    public function getLabelTemplateMetaName()
    {
        return $this->container['label_template_meta_name'];
    }

    /**
     * Sets label_template_meta_name
     *
     * @param string|null $label_template_meta_name label_template_meta_name
     *
     * @return $this
     */
    public function setLabelTemplateMetaName($label_template_meta_name)
    {
        $this->container['label_template_meta_name'] = $label_template_meta_name;

        return $this;
    }

    /**
     * Gets label_name
     *
     * @return string|null
     */
    public function getLabelName()
    {
        return $this->container['label_name'];
    }

    /**
     * Sets label_name
     *
     * @param string|null $label_name label_name
     *
     * @return $this
     */
    public function setLabelName($label_name)
    {
        $this->container['label_name'] = $label_name;

        return $this;
    }
    /**
     * Returns true if offset exists. False otherwise.
     *
     * @param integer $offset Offset
     *
     * @return boolean
     */
    public function offsetExists($offset): bool
    {
        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
     */
    public function offsetSet($offset, $value): void
    {
        if (is_null($offset)) {
            $this->container[] = $value;
        } else {
            $this->container[$offset] = $value;
        }
    }

    /**
     * Unsets offset.
     *
     * @param integer $offset Offset
     *
     * @return void
     */
    public function offsetUnset($offset): void
    {
        unset($this->container[$offset]);
    }

    /**
     * Gets the string presentation of the object
     *
     * @return string
     */
    public function __toString()
    {
        return json_encode(
            ObjectSerializer::sanitizeForSerialization($this),
            JSON_PRETTY_PRINT
        );
    }
}


