<?php
/**
 * This code was generated by
 * ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
 *  |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
 *  |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \
 *
 * Twilio Memory API
 * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities.
 *
 * NOTE: This class is auto generated by OpenAPI Generator.
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

namespace Twilio\Rest\Memory\V1;

use Twilio\Values;
abstract class OperationModels
{
    /**
     * @property string $type
     * @property string $id The identifier of the created or affected resource.
    */
    public static function createOperationResultResourceId(array $payload = []): OperationResultResourceId
    {
        return new OperationResultResourceId($payload);
    }

    /**
     * @property string $type A URI reference identifying the problem type.
     * @property string $title A short, human-readable summary of the problem type.
     * @property int $code The numeric Twilio error code.
     * @property string $detail A human-readable explanation specific to this occurrence of the problem.
    */
    public static function createOperationStatusError(array $payload = []): OperationStatusError
    {
        return new OperationStatusError($payload);
    }

}

class OperationResultResourceId implements \JsonSerializable
{
    /**
     * @property string $type
     * @property string $id The identifier of the created or affected resource.
    */
        protected $type;
        protected $id;
    public function __construct(array $payload = []) {
        $this->type = Values::array_get($payload, 'type');
        $this->id = Values::array_get($payload, 'id');
    }

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

    public function jsonSerialize(): array
    {
        $jsonString = [
            'type' => $this->type,
            'id' => $this->id
        ];
        return $jsonString;
    }
}

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

    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->code)) {
            $jsonString['code'] = $this->code;
        }
        if (isset($this->detail)) {
            $jsonString['detail'] = $this->detail;
        }
        return $jsonString;
    }
}

