Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add moderation service #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
265 changes: 265 additions & 0 deletions Services/Moderation/V2/Model/RunImageBatchModerationRequest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,265 @@
<?php

namespace HuaweiCloud\SDK\Moderation\V2\Model;

use \ArrayAccess;
use HuaweiCloud\SDK\Core\Utils\ObjectSerializer;
use HuaweiCloud\SDK\Core\Utils\ModelInterface;
use HuaweiCloud\SDK\Core\SdkResponse;

class RunImageBatchModerationRequest implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;

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

/**
* Array of property to type mappings. Used for (de)serialization
* body body
*
* @var string[]
*/
protected static $openAPITypes = [
'body' => '\HuaweiCloud\SDK\Moderation\V2\Model\RunImageBatchModerationRequestBody'
];

/**
* Array of property to format mappings. Used for (de)serialization
* body body
*
* @var string[]
*/
protected static $openAPIFormats = [
'body' => 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
* body body
*
* @var string[]
*/
protected static $attributeMap = [
'body' => 'body'
];

/**
* Array of attributes to setter functions (for deserialization of responses)
* body body
*
* @var string[]
*/
protected static $setters = [
'body' => 'setBody'
];

/**
* Array of attributes to getter functions (for serialization of requests)
* body body
*
* @var string[]
*/
protected static $getters = [
'body' => 'getBody'
];

/**
* 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['body'] = isset($data['body']) ? $data['body'] : 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 body
* body
*
* @return \HuaweiCloud\SDK\Moderation\V2\Model\RunImageBatchModerationRequestBody|null
*/
public function getBody()
{
return $this->container['body'];
}

/**
* Sets body
*
* @param \HuaweiCloud\SDK\Moderation\V2\Model\RunImageBatchModerationRequestBody|null $body body
*
* @return $this
*/
public function setBody($body)
{
$this->container['body'] = $body;
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()
{
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
}

Loading