<?php
/**
 * TemplateSummaryDiff
 *
 * 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;

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

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $openAPITypes = [
        'buckets' => '\InfluxDB2\Model\TemplateSummaryDiffBuckets[]',
        'checks' => '\InfluxDB2\Model\TemplateSummaryDiffChecks[]',
        'dashboards' => '\InfluxDB2\Model\TemplateSummaryDiffDashboards[]',
        'labels' => '\InfluxDB2\Model\TemplateSummaryDiffLabels[]',
        'label_mappings' => '\InfluxDB2\Model\TemplateSummaryDiffLabelMappings[]',
        'notification_endpoints' => '\InfluxDB2\Model\TemplateSummaryDiffNotificationEndpoints[]',
        'notification_rules' => '\InfluxDB2\Model\TemplateSummaryDiffNotificationRules[]',
        'tasks' => '\InfluxDB2\Model\TemplateSummaryDiffTasks[]',
        'telegraf_configs' => '\InfluxDB2\Model\TemplateSummaryDiffTelegrafConfigs[]',
        'variables' => '\InfluxDB2\Model\TemplateSummaryDiffVariables[]'
    ];

    /**
      * Array of property to format mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $openAPIFormats = [
        'buckets' => null,
        'checks' => null,
        'dashboards' => null,
        'labels' => null,
        'label_mappings' => null,
        'notification_endpoints' => null,
        'notification_rules' => null,
        'tasks' => null,
        'telegraf_configs' => null,
        'variables' => 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 = [
        'buckets' => 'buckets',
        'checks' => 'checks',
        'dashboards' => 'dashboards',
        'labels' => 'labels',
        'label_mappings' => 'labelMappings',
        'notification_endpoints' => 'notificationEndpoints',
        'notification_rules' => 'notificationRules',
        'tasks' => 'tasks',
        'telegraf_configs' => 'telegrafConfigs',
        'variables' => 'variables'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'buckets' => 'setBuckets',
        'checks' => 'setChecks',
        'dashboards' => 'setDashboards',
        'labels' => 'setLabels',
        'label_mappings' => 'setLabelMappings',
        'notification_endpoints' => 'setNotificationEndpoints',
        'notification_rules' => 'setNotificationRules',
        'tasks' => 'setTasks',
        'telegraf_configs' => 'setTelegrafConfigs',
        'variables' => 'setVariables'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'buckets' => 'getBuckets',
        'checks' => 'getChecks',
        'dashboards' => 'getDashboards',
        'labels' => 'getLabels',
        'label_mappings' => 'getLabelMappings',
        'notification_endpoints' => 'getNotificationEndpoints',
        'notification_rules' => 'getNotificationRules',
        'tasks' => 'getTasks',
        'telegraf_configs' => 'getTelegrafConfigs',
        'variables' => 'getVariables'
    ];

    /**
     * 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['buckets'] = isset($data['buckets']) ? $data['buckets'] : null;
        $this->container['checks'] = isset($data['checks']) ? $data['checks'] : null;
        $this->container['dashboards'] = isset($data['dashboards']) ? $data['dashboards'] : null;
        $this->container['labels'] = isset($data['labels']) ? $data['labels'] : null;
        $this->container['label_mappings'] = isset($data['label_mappings']) ? $data['label_mappings'] : null;
        $this->container['notification_endpoints'] = isset($data['notification_endpoints']) ? $data['notification_endpoints'] : null;
        $this->container['notification_rules'] = isset($data['notification_rules']) ? $data['notification_rules'] : null;
        $this->container['tasks'] = isset($data['tasks']) ? $data['tasks'] : null;
        $this->container['telegraf_configs'] = isset($data['telegraf_configs']) ? $data['telegraf_configs'] : null;
        $this->container['variables'] = isset($data['variables']) ? $data['variables'] : 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 buckets
     *
     * @return \InfluxDB2\Model\TemplateSummaryDiffBuckets[]|null
     */
    public function getBuckets()
    {
        return $this->container['buckets'];
    }

    /**
     * Sets buckets
     *
     * @param \InfluxDB2\Model\TemplateSummaryDiffBuckets[]|null $buckets buckets
     *
     * @return $this
     */
    public function setBuckets($buckets)
    {
        $this->container['buckets'] = $buckets;

        return $this;
    }

    /**
     * Gets checks
     *
     * @return \InfluxDB2\Model\TemplateSummaryDiffChecks[]|null
     */
    public function getChecks()
    {
        return $this->container['checks'];
    }

    /**
     * Sets checks
     *
     * @param \InfluxDB2\Model\TemplateSummaryDiffChecks[]|null $checks checks
     *
     * @return $this
     */
    public function setChecks($checks)
    {
        $this->container['checks'] = $checks;

        return $this;
    }

    /**
     * Gets dashboards
     *
     * @return \InfluxDB2\Model\TemplateSummaryDiffDashboards[]|null
     */
    public function getDashboards()
    {
        return $this->container['dashboards'];
    }

    /**
     * Sets dashboards
     *
     * @param \InfluxDB2\Model\TemplateSummaryDiffDashboards[]|null $dashboards dashboards
     *
     * @return $this
     */
    public function setDashboards($dashboards)
    {
        $this->container['dashboards'] = $dashboards;

        return $this;
    }

    /**
     * Gets labels
     *
     * @return \InfluxDB2\Model\TemplateSummaryDiffLabels[]|null
     */
    public function getLabels()
    {
        return $this->container['labels'];
    }

    /**
     * Sets labels
     *
     * @param \InfluxDB2\Model\TemplateSummaryDiffLabels[]|null $labels labels
     *
     * @return $this
     */
    public function setLabels($labels)
    {
        $this->container['labels'] = $labels;

        return $this;
    }

    /**
     * Gets label_mappings
     *
     * @return \InfluxDB2\Model\TemplateSummaryDiffLabelMappings[]|null
     */
    public function getLabelMappings()
    {
        return $this->container['label_mappings'];
    }

    /**
     * Sets label_mappings
     *
     * @param \InfluxDB2\Model\TemplateSummaryDiffLabelMappings[]|null $label_mappings label_mappings
     *
     * @return $this
     */
    public function setLabelMappings($label_mappings)
    {
        $this->container['label_mappings'] = $label_mappings;

        return $this;
    }

    /**
     * Gets notification_endpoints
     *
     * @return \InfluxDB2\Model\TemplateSummaryDiffNotificationEndpoints[]|null
     */
    public function getNotificationEndpoints()
    {
        return $this->container['notification_endpoints'];
    }

    /**
     * Sets notification_endpoints
     *
     * @param \InfluxDB2\Model\TemplateSummaryDiffNotificationEndpoints[]|null $notification_endpoints notification_endpoints
     *
     * @return $this
     */
    public function setNotificationEndpoints($notification_endpoints)
    {
        $this->container['notification_endpoints'] = $notification_endpoints;

        return $this;
    }

    /**
     * Gets notification_rules
     *
     * @return \InfluxDB2\Model\TemplateSummaryDiffNotificationRules[]|null
     */
    public function getNotificationRules()
    {
        return $this->container['notification_rules'];
    }

    /**
     * Sets notification_rules
     *
     * @param \InfluxDB2\Model\TemplateSummaryDiffNotificationRules[]|null $notification_rules notification_rules
     *
     * @return $this
     */
    public function setNotificationRules($notification_rules)
    {
        $this->container['notification_rules'] = $notification_rules;

        return $this;
    }

    /**
     * Gets tasks
     *
     * @return \InfluxDB2\Model\TemplateSummaryDiffTasks[]|null
     */
    public function getTasks()
    {
        return $this->container['tasks'];
    }

    /**
     * Sets tasks
     *
     * @param \InfluxDB2\Model\TemplateSummaryDiffTasks[]|null $tasks tasks
     *
     * @return $this
     */
    public function setTasks($tasks)
    {
        $this->container['tasks'] = $tasks;

        return $this;
    }

    /**
     * Gets telegraf_configs
     *
     * @return \InfluxDB2\Model\TemplateSummaryDiffTelegrafConfigs[]|null
     */
    public function getTelegrafConfigs()
    {
        return $this->container['telegraf_configs'];
    }

    /**
     * Sets telegraf_configs
     *
     * @param \InfluxDB2\Model\TemplateSummaryDiffTelegrafConfigs[]|null $telegraf_configs telegraf_configs
     *
     * @return $this
     */
    public function setTelegrafConfigs($telegraf_configs)
    {
        $this->container['telegraf_configs'] = $telegraf_configs;

        return $this;
    }

    /**
     * Gets variables
     *
     * @return \InfluxDB2\Model\TemplateSummaryDiffVariables[]|null
     */
    public function getVariables()
    {
        return $this->container['variables'];
    }

    /**
     * Sets variables
     *
     * @param \InfluxDB2\Model\TemplateSummaryDiffVariables[]|null $variables variables
     *
     * @return $this
     */
    public function setVariables($variables)
    {
        $this->container['variables'] = $variables;

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


