<?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 StoreModels
{
    /**
     * @property string $displayName Provides a unique and addressable name to be assigned to this Store. This name is assigned by the developer and can be used in addition to the ID. It is intended to be human-readable and unique within the account.
     * @property string $description A human readable description of this resource, up to 128 characters.
    */
    public static function createServiceRequest(array $payload = []): ServiceRequest
    {
        return new ServiceRequest($payload);
    }

    /**
     * @property string $displayName Provides a unique and addressable name to be assigned to this Store. This name is assigned by the developer and can be used in addition to the ID. It is intended to be human-readable and unique within the account.
     * @property string $description A human readable description of this resource, up to 128 characters.
    */
    public static function createPatchStoreRequest(array $payload = []): PatchStoreRequest
    {
        return new PatchStoreRequest($payload);
    }

    /**
     * @property string $key The key of the list property contains the actual data items. This enables programmatic iteration over paginated results.
     * @property int $pageSize
     * @property string $nextToken
     * @property string $previousToken
    */
    public static function createMeta(array $payload = []): Meta
    {
        return new Meta($payload);
    }

}

class ServiceRequest implements \JsonSerializable
{
    /**
     * @property string $displayName Provides a unique and addressable name to be assigned to this Store. This name is assigned by the developer and can be used in addition to the ID. It is intended to be human-readable and unique within the account.
     * @property string $description A human readable description of this resource, up to 128 characters.
    */
        protected $displayName;
        protected $description;
    public function __construct(array $payload = []) {
        $this->displayName = Values::array_get($payload, 'displayName');
        $this->description = Values::array_get($payload, 'description');
    }

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

    public function jsonSerialize(): array
    {
        $jsonString = [
            'displayName' => $this->displayName
        ];
        if (isset($this->description)) {
            $jsonString['description'] = $this->description;
        }
        return $jsonString;
    }
}

class PatchStoreRequest implements \JsonSerializable
{
    /**
     * @property string $displayName Provides a unique and addressable name to be assigned to this Store. This name is assigned by the developer and can be used in addition to the ID. It is intended to be human-readable and unique within the account.
     * @property string $description A human readable description of this resource, up to 128 characters.
    */
        protected $displayName;
        protected $description;
    public function __construct(array $payload = []) {
        $this->displayName = Values::array_get($payload, 'displayName');
        $this->description = Values::array_get($payload, 'description');
    }

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

    public function jsonSerialize(): array
    {
        $jsonString = [
        ];
        if (isset($this->displayName)) {
            $jsonString['displayName'] = $this->displayName;
        }
        if (isset($this->description)) {
            $jsonString['description'] = $this->description;
        }
        return $jsonString;
    }
}

class Meta implements \JsonSerializable
{
    /**
     * @property string $key The key of the list property contains the actual data items. This enables programmatic iteration over paginated results.
     * @property int $pageSize
     * @property string $nextToken
     * @property string $previousToken
    */
        protected $key;
        protected $pageSize;
        protected $nextToken;
        protected $previousToken;
    public function __construct(array $payload = []) {
        $this->key = Values::array_get($payload, 'key');
        $this->pageSize = Values::array_get($payload, 'pageSize');
        $this->nextToken = Values::array_get($payload, 'nextToken');
        $this->previousToken = Values::array_get($payload, 'previousToken');
    }

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

    public function jsonSerialize(): array
    {
        $jsonString = [
        ];
        if (isset($this->key)) {
            $jsonString['key'] = $this->key;
        }
        if (isset($this->pageSize)) {
            $jsonString['pageSize'] = $this->pageSize;
        }
        if (isset($this->nextToken)) {
            $jsonString['nextToken'] = $this->nextToken;
        }
        if (isset($this->previousToken)) {
            $jsonString['previousToken'] = $this->previousToken;
        }
        return $jsonString;
    }
}

