<?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 ProfileModels
{
    /**
     * @property array<string,array<string,mixed>> $traits Multiple trait groups.
    */
    public static function createProfileData(array $payload = []): ProfileData
    {
        return new ProfileData($payload);
    }

    /**
     * @property array<string,array<string,mixed>> $traits Multiple trait groups.
    */
    public static function createProfilePatch(array $payload = []): ProfilePatch
    {
        return new ProfilePatch($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 createProfilesMeta(array $payload = []): ProfilesMeta
    {
        return new ProfilesMeta($payload);
    }

}

class ProfileData implements \JsonSerializable
{
    /**
     * @property array<string,array<string,mixed>> $traits Multiple trait groups.
    */
        protected $traits;
    public function __construct(array $payload = []) {
        $this->traits = Values::array_get($payload, 'traits');
    }

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

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

class ProfilePatch implements \JsonSerializable
{
    /**
     * @property array<string,array<string,mixed>> $traits Multiple trait groups.
    */
        protected $traits;
    public function __construct(array $payload = []) {
        $this->traits = Values::array_get($payload, 'traits');
    }

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

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

class ProfilesMeta 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;
    }
}

