lionbridge_translation_provider-8.x-2.4/tmgmt_contentapi/src/Swagger/Client/Model/SourceFile.php
tmgmt_contentapi/src/Swagger/Client/Model/SourceFile.php
<?php
/**
* SourceFile
*
* PHP version 5
*
* @category Class
* @package Drupal\tmgmt_contentapi\Swagger\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* The Lionbridge Content API
*
* Enable translations with the Lionbridge Content API.
*
* OpenAPI spec version: 1.4.3
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
* Swagger Codegen version: 2.3.1
*/
/**
* 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 Drupal\tmgmt_contentapi\Swagger\Client\Model;
use \ArrayAccess;
use \Drupal\tmgmt_contentapi\Swagger\Client\ObjectSerializer;
/**
* SourceFile Class Doc Comment
*
* @category Class
* @package Drupal\tmgmt_contentapi\Swagger\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class SourceFile implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'SourceFile';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
'fms_sas_token' => 'string',
'fms_upload_url' => 'string',
'fms_multipart_url' => 'string',
'fms_file_id' => 'string'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
'fms_sas_token' => null,
'fms_upload_url' => null,
'fms_multipart_url' => null,
'fms_file_id' => 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 = [
'fms_sas_token' => 'fmsSASToken',
'fms_upload_url' => 'fmsUploadUrl',
'fms_multipart_url' => 'fmsPostMultipartUrl',
'fms_file_id' => 'fmsFileId'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'fms_sas_token' => 'setFileId',
'fms_upload_url' => 'setJobId',
'fms_multipart_url' => 'setfms_multipart_url',
'fms_file_id' => 'setfms_file_id'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'fms_sas_token' => 'getFileId',
'fms_upload_url' => 'getJobId',
'fms_multipart_url' => 'getfms_multipart_url',
'fms_file_id' => 'getfms_file_id'
];
/**
* 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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
public function __construct(array $data = null)
{
$this->container['fms_sas_token'] = isset($data['fms_sas_token']) ? $data['fms_sas_token'] : null;
$this->container['fms_upload_url'] = isset($data['fms_upload_url']) ? $data['fms_upload_url'] : null;
$this->container['fms_multipart_url'] = isset($data['fms_multipart_url']) ? $data['fms_multipart_url'] : null;
$this->container['fms_file_id'] = isset($data['fms_file_id']) ? $data['fms_file_id'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
#[\ReturnTypeWillChange]
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['fms_sas_token'] === null) {
$invalidProperties[] = "'fms_sas_token' can't be null";
}
if ($this->container['fms_upload_url'] === null) {
$invalidProperties[] = "'fms_upload_url' can't be null";
}
if ($this->container['fms_multipart_url'] === null) {
$invalidProperties[] = "'fms_multipart_url' can't be null";
}
if ($this->container['fms_file_id'] === null) {
$invalidProperties[] = "'fms_file_id' 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
*/
#[\ReturnTypeWillChange]
public function valid()
{
if ($this->container['fms_sas_token'] === null) {
return false;
}
if ($this->container['fms_upload_url'] === null) {
return false;
}
if ($this->container['fms_multipart_url'] === null) {
return false;
}
if ($this->container['fms_file_id'] === null) {
return false;
}
return true;
}
/**
* Gets fms_sas_token
*
* @return string
*/
#[\ReturnTypeWillChange]
public function getFileId()
{
return $this->container['fms_sas_token'];
}
/**
* Sets fms_sas_token
*
* @param string $fms_sas_token Unique identifier representing source file.
*
* @return $this
*/
#[\ReturnTypeWillChange]
public function setFileId($fms_sas_token)
{
$this->container['fms_sas_token'] = $fms_sas_token;
return $this;
}
/**
* Gets fms_upload_url
*
* @return string
*/
#[\ReturnTypeWillChange]
public function getJobId()
{
return $this->container['fms_upload_url'];
}
/**
* Sets fms_upload_url
*
* @param string $fms_upload_url Unique identifier representing a translation job.
*
* @return $this
*/
#[\ReturnTypeWillChange]
public function setJobId($fms_upload_url)
{
$this->container['fms_upload_url'] = $fms_upload_url;
return $this;
}
/**
* Gets fms_multipart_url
*
* @return string
*/
#[\ReturnTypeWillChange]
public function getfms_multipart_url()
{
return $this->container['fms_multipart_url'];
}
/**
* Sets fms_multipart_url
*
* @param string $fms_multipart_url Name of file
*
* @return $this
*/
#[\ReturnTypeWillChange]
public function setfms_multipart_url($fms_multipart_url)
{
$this->container['fms_multipart_url'] = $fms_multipart_url;
return $this;
}
/**
* Gets fms_file_id
*
* @return string
*/
#[\ReturnTypeWillChange]
public function getfms_file_id()
{
return $this->container['fms_file_id'];
}
/**
* Sets fms_file_id
*
* @param string $fms_file_id Type of file.
*
* @return $this
*/
#[\ReturnTypeWillChange]
public function setfms_file_id($fms_file_id)
{
$this->container['fms_file_id'] = $fms_file_id;
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
*/
#[\ReturnTypeWillChange]
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));
}
}
