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

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

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $openAPITypes = [
        'buckets' => '\InfluxDB2\Model\TemplateSummarySummaryBuckets[]',
        'checks' => 'CheckDiscriminator[]',
        'dashboards' => '\InfluxDB2\Model\TemplateSummarySummaryDashboards[]',
        'labels' => '\InfluxDB2\Model\TemplateSummaryLabel[]',
        'label_mappings' => '\InfluxDB2\Model\TemplateSummarySummaryLabelMappings[]',
        'missing_env_refs' => 'string[]',
        'missing_secrets' => 'string[]',
        'notification_endpoints' => 'NotificationEndpointDiscriminator[]',
        'notification_rules' => '\InfluxDB2\Model\TemplateSummarySummaryNotificationRules[]',
        'tasks' => '\InfluxDB2\Model\TemplateSummarySummaryTasks[]',
        'telegraf_configs' => 'TelegrafRequest[]',
        'variables' => '\InfluxDB2\Model\TemplateSummarySummaryVariables[]'
    ];

    /**
      * 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,
        'missing_env_refs' => null,
        'missing_secrets' => 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',
        'missing_env_refs' => 'missingEnvRefs',
        'missing_secrets' => 'missingSecrets',
        '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',
        'missing_env_refs' => 'setMissingEnvRefs',
        'missing_secrets' => 'setMissingSecrets',
        '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',
        'missing_env_refs' => 'getMissingEnvRefs',
        'missing_secrets' => 'getMissingSecrets',
        '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['missing_env_refs'] = isset($data['missing_env_refs']) ? $data['missing_env_refs'] : null;
        $this->container['missing_secrets'] = isset($data['missing_secrets']) ? $data['missing_secrets'] : 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\TemplateSummarySummaryBuckets[]|null
     */
    public function getBuckets()
    {
        return $this->container['buckets'];
    }

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

    /**
     * Sets notification_endpoints
     *
     * @param NotificationEndpointDiscriminator[]|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\TemplateSummarySummaryNotificationRules[]|null
     */
    public function getNotificationRules()
    {
        return $this->container['notification_rules'];
    }

    /**
     * Sets notification_rules
     *
     * @param \InfluxDB2\Model\TemplateSummarySummaryNotificationRules[]|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\TemplateSummarySummaryTasks[]|null
     */
    public function getTasks()
    {
        return $this->container['tasks'];
    }

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

        return $this;
    }

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

    /**
     * Sets telegraf_configs
     *
     * @param TelegrafRequest[]|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\TemplateSummarySummaryVariables[]|null
     */
    public function getVariables()
    {
        return $this->container['variables'];
    }

    /**
     * Sets variables
     *
     * @param \InfluxDB2\Model\TemplateSummarySummaryVariables[]|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
        );
    }
}


