<?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 ConversationSummaryModels
{
    /**
     * @property string $source The source system that generated the summary. Allows letters, numbers, spaces, and URL-safe symbols. Excludes URL-unsafe characters like quotes, angle brackets, and control characters.
     * @property string $content The main content of the summary.
     * @property \DateTime $occurredAt The timestamp when the summary was originally created.
     * @property string $conversationId A unique identifier for the conversation using Twilio Type ID (TTID) format.
    */
    public static function createSummaryCore(array $payload = []): SummaryCore
    {
        return new SummaryCore($payload);
    }

    /**
     * @property SummaryCore[] $summaries Array of summaries to create in a single batch operation.
    */
    public static function createCreateSummariesRequest(array $payload = []): CreateSummariesRequest
    {
        return new CreateSummariesRequest($payload);
    }

    /**
     * @property string $source The source system that generated the summary. Allows letters, numbers, spaces, and URL-safe symbols. Excludes URL-unsafe characters like quotes, angle brackets, and control characters.
     * @property string $content The main content of the summary.
     * @property \DateTime $occurredAt The timestamp when the summary was originally created. If not provided, defaults to the time the summary was received.
     * @property string $conversationId A unique identifier for the conversation using Twilio Type ID (TTID) format.
    */
    public static function createSummaryCorePatch(array $payload = []): SummaryCorePatch
    {
        return new SummaryCorePatch($payload);
    }

}

class SummaryCore implements \JsonSerializable
{
    /**
     * @property string $source The source system that generated the summary. Allows letters, numbers, spaces, and URL-safe symbols. Excludes URL-unsafe characters like quotes, angle brackets, and control characters.
     * @property string $content The main content of the summary.
     * @property \DateTime $occurredAt The timestamp when the summary was originally created.
     * @property string $conversationId A unique identifier for the conversation using Twilio Type ID (TTID) format.
    */
        protected $source;
        protected $content;
        protected $occurredAt;
        protected $conversationId;
    public function __construct(array $payload = []) {
        $this->source = Values::array_get($payload, 'source');
        $this->content = Values::array_get($payload, 'content');
        $this->occurredAt = Values::array_get($payload, 'occurredAt');
        $this->conversationId = Values::array_get($payload, 'conversationId');
    }

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

    public function jsonSerialize(): array
    {
        $jsonString = [
            'content' => $this->content,
            'occurredAt' => $this->occurredAt,
            'conversationId' => $this->conversationId
        ];
        if (isset($this->source)) {
            $jsonString['source'] = $this->source;
        }
        return $jsonString;
    }
}

class CreateSummariesRequest implements \JsonSerializable
{
    /**
     * @property SummaryCore[] $summaries Array of summaries to create in a single batch operation.
    */
        protected $summaries;
    public function __construct(array $payload = []) {
        $this->summaries = Values::array_get($payload, 'summaries');
    }

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

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

class SummaryCorePatch implements \JsonSerializable
{
    /**
     * @property string $source The source system that generated the summary. Allows letters, numbers, spaces, and URL-safe symbols. Excludes URL-unsafe characters like quotes, angle brackets, and control characters.
     * @property string $content The main content of the summary.
     * @property \DateTime $occurredAt The timestamp when the summary was originally created. If not provided, defaults to the time the summary was received.
     * @property string $conversationId A unique identifier for the conversation using Twilio Type ID (TTID) format.
    */
        protected $source;
        protected $content;
        protected $occurredAt;
        protected $conversationId;
    public function __construct(array $payload = []) {
        $this->source = Values::array_get($payload, 'source');
        $this->content = Values::array_get($payload, 'content');
        $this->occurredAt = Values::array_get($payload, 'occurredAt');
        $this->conversationId = Values::array_get($payload, 'conversationId');
    }

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

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

