/home/arranoyd/magicraft/wp-content/plugins/ninja-popups/include/moosend/lib/Model/Segment.php
<?php
/**
* Segment
*
* PHP version 5
*
* @category Class
* @package Swagger\Client
* @author Swaagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Moosend API
*
* TODO: Add a description
*
* OpenAPI spec version: 1.0
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**
* 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 Swagger\Client\Model;
use \ArrayAccess;
/**
* Segment Class Doc Comment
*
* @category Class
* @package Swagger\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class Segment implements ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
* @var string
*/
protected static $swaggerModelName = 'Segment';
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerTypes = [
'created_by' => 'string',
'created_on' => 'string',
'criteria' => '\Swagger\Client\Model\Criterion[]',
'description' => 'string',
'fetch_type' => 'double',
'fetch_value' => 'double',
'id' => 'double',
'match_type' => 'double',
'name' => 'string',
'updated_by' => 'string',
'updated_on' => 'string'
];
/**
* Array of property to format mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerFormats = [
'created_by' => null,
'created_on' => null,
'criteria' => null,
'description' => null,
'fetch_type' => 'double',
'fetch_value' => 'double',
'id' => 'double',
'match_type' => 'double',
'name' => null,
'updated_by' => null,
'updated_on' => null
];
public static function swaggerTypes()
{
return self::$swaggerTypes;
}
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 = [
'created_by' => 'CreatedBy',
'created_on' => 'CreatedOn',
'criteria' => 'Criteria',
'description' => 'Description',
'fetch_type' => 'FetchType',
'fetch_value' => 'FetchValue',
'id' => 'ID',
'match_type' => 'MatchType',
'name' => 'Name',
'updated_by' => 'UpdatedBy',
'updated_on' => 'UpdatedOn'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = [
'created_by' => 'setCreatedBy',
'created_on' => 'setCreatedOn',
'criteria' => 'setCriteria',
'description' => 'setDescription',
'fetch_type' => 'setFetchType',
'fetch_value' => 'setFetchValue',
'id' => 'setId',
'match_type' => 'setMatchType',
'name' => 'setName',
'updated_by' => 'setUpdatedBy',
'updated_on' => 'setUpdatedOn'
];
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = [
'created_by' => 'getCreatedBy',
'created_on' => 'getCreatedOn',
'criteria' => 'getCriteria',
'description' => 'getDescription',
'fetch_type' => 'getFetchType',
'fetch_value' => 'getFetchValue',
'id' => 'getId',
'match_type' => 'getMatchType',
'name' => 'getName',
'updated_by' => 'getUpdatedBy',
'updated_on' => 'getUpdatedOn'
];
public static function attributeMap()
{
return self::$attributeMap;
}
public static function setters()
{
return self::$setters;
}
public static function getters()
{
return self::$getters;
}
/**
* 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['created_by'] = isset($data['created_by']) ? $data['created_by'] : null;
$this->container['created_on'] = isset($data['created_on']) ? $data['created_on'] : null;
$this->container['criteria'] = isset($data['criteria']) ? $data['criteria'] : null;
$this->container['description'] = isset($data['description']) ? $data['description'] : null;
$this->container['fetch_type'] = isset($data['fetch_type']) ? $data['fetch_type'] : null;
$this->container['fetch_value'] = isset($data['fetch_value']) ? $data['fetch_value'] : null;
$this->container['id'] = isset($data['id']) ? $data['id'] : null;
$this->container['match_type'] = isset($data['match_type']) ? $data['match_type'] : null;
$this->container['name'] = isset($data['name']) ? $data['name'] : null;
$this->container['updated_by'] = isset($data['updated_by']) ? $data['updated_by'] : null;
$this->container['updated_on'] = isset($data['updated_on']) ? $data['updated_on'] : null;
}
/**
* show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalid_properties = [];
return $invalid_properties;
}
/**
* validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return true;
}
/**
* Gets created_by
* @return string
*/
public function getCreatedBy()
{
return $this->container['created_by'];
}
/**
* Sets created_by
* @param string $created_by
* @return $this
*/
public function setCreatedBy($created_by)
{
$this->container['created_by'] = $created_by;
return $this;
}
/**
* Gets created_on
* @return string
*/
public function getCreatedOn()
{
return $this->container['created_on'];
}
/**
* Sets created_on
* @param string $created_on
* @return $this
*/
public function setCreatedOn($created_on)
{
$this->container['created_on'] = $created_on;
return $this;
}
/**
* Gets criteria
* @return \Swagger\Client\Model\Criterion[]
*/
public function getCriteria()
{
return $this->container['criteria'];
}
/**
* Sets criteria
* @param \Swagger\Client\Model\Criterion[] $criteria
* @return $this
*/
public function setCriteria($criteria)
{
$this->container['criteria'] = $criteria;
return $this;
}
/**
* Gets description
* @return string
*/
public function getDescription()
{
return $this->container['description'];
}
/**
* Sets description
* @param string $description
* @return $this
*/
public function setDescription($description)
{
$this->container['description'] = $description;
return $this;
}
/**
* Gets fetch_type
* @return double
*/
public function getFetchType()
{
return $this->container['fetch_type'];
}
/**
* Sets fetch_type
* @param double $fetch_type
* @return $this
*/
public function setFetchType($fetch_type)
{
$this->container['fetch_type'] = $fetch_type;
return $this;
}
/**
* Gets fetch_value
* @return double
*/
public function getFetchValue()
{
return $this->container['fetch_value'];
}
/**
* Sets fetch_value
* @param double $fetch_value
* @return $this
*/
public function setFetchValue($fetch_value)
{
$this->container['fetch_value'] = $fetch_value;
return $this;
}
/**
* Gets id
* @return double
*/
public function getId()
{
return $this->container['id'];
}
/**
* Sets id
* @param double $id
* @return $this
*/
public function setId($id)
{
$this->container['id'] = $id;
return $this;
}
/**
* Gets match_type
* @return double
*/
public function getMatchType()
{
return $this->container['match_type'];
}
/**
* Sets match_type
* @param double $match_type
* @return $this
*/
public function setMatchType($match_type)
{
$this->container['match_type'] = $match_type;
return $this;
}
/**
* Gets name
* @return string
*/
public function getName()
{
return $this->container['name'];
}
/**
* Sets name
* @param string $name
* @return $this
*/
public function setName($name)
{
$this->container['name'] = $name;
return $this;
}
/**
* Gets updated_by
* @return string
*/
public function getUpdatedBy()
{
return $this->container['updated_by'];
}
/**
* Sets updated_by
* @param string $updated_by
* @return $this
*/
public function setUpdatedBy($updated_by)
{
$this->container['updated_by'] = $updated_by;
return $this;
}
/**
* Gets updated_on
* @return string
*/
public function getUpdatedOn()
{
return $this->container['updated_on'];
}
/**
* Sets updated_on
* @param string $updated_on
* @return $this
*/
public function setUpdatedOn($updated_on)
{
$this->container['updated_on'] = $updated_on;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
* @param integer $offset Offset
* @return boolean
*/
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
* @param integer $offset Offset
* @return mixed
*/
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)
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
* @param integer $offset Offset
* @return void
*/
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(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}