<?php
/**
 * This code was generated by
 * ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
 *  |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
 *  |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \
 *
 * Conversation Orchestrator
 * Manage configurations, conversations, participants, and communications. Create configurations to define capture rules and channel settings, then use conversations to group related communications.
 *
 * NOTE: This class is auto generated by OpenAPI Generator.
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

namespace Twilio\Rest\Conversations\V2;

use Twilio\Values;
abstract class OperationModels
{
    /**
     * @property string $type A URI reference that identifies the problem type.
     * @property string $title A short, human-readable summary of the problem type.
     * @property int $status The HTTP status code for this occurrence of the problem.
     * @property string $detail A human-readable explanation specific to this occurrence.
     * @property string $instance A URI reference that identifies the specific occurrence of the problem.
    */
    public static function createFetchOperationStatus200ResponseError(array $payload = []): FetchOperationStatus200ResponseError
    {
        return new FetchOperationStatus200ResponseError($payload);
    }

}

class FetchOperationStatus200ResponseError implements \JsonSerializable
{
    /**
     * @property string $type A URI reference that identifies the problem type.
     * @property string $title A short, human-readable summary of the problem type.
     * @property int $status The HTTP status code for this occurrence of the problem.
     * @property string $detail A human-readable explanation specific to this occurrence.
     * @property string $instance A URI reference that identifies the specific occurrence of the problem.
    */
        protected $type;
        protected $title;
        protected $status;
        protected $detail;
        protected $instance;
    public function __construct(array $payload = []) {
        $this->type = Values::array_get($payload, 'type');
        $this->title = Values::array_get($payload, 'title');
        $this->status = Values::array_get($payload, 'status');
        $this->detail = Values::array_get($payload, 'detail');
        $this->instance = Values::array_get($payload, 'instance');
    }

    public function toArray(): array
    {
        return $this->jsonSerialize();
    }

    public function jsonSerialize(): array
    {
        $jsonString = [
        ];
        if (isset($this->type)) {
            $jsonString['type'] = $this->type;
        }
        if (isset($this->title)) {
            $jsonString['title'] = $this->title;
        }
        if (isset($this->status)) {
            $jsonString['status'] = $this->status;
        }
        if (isset($this->detail)) {
            $jsonString['detail'] = $this->detail;
        }
        if (isset($this->instance)) {
            $jsonString['instance'] = $this->instance;
        }
        return $jsonString;
    }
}

