<?php
/**
 * This code was generated by
 * ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
 *  |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
 *  |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \
 *
 * Twilio Knowledge API
 * APIs for managing knowledge bases and knowledge content for AI-powered applications.
 *
 * NOTE: This class is auto generated by OpenAPI Generator.
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

namespace Twilio\Rest\Knowledge\V2;

use Twilio\Values;
abstract class KnowledgeBasisModels
{
    /**
     * @property string $displayName Provides a unique and addressable name to be assigned to this Knowledge Base. 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 createKnowledgeBaseCore(array $payload = []): KnowledgeBaseCore
    {
        return new KnowledgeBaseCore($payload);
    }

    /**
     * @property string $displayName Provides a unique and addressable name to be assigned to this Knowledge Base. 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 createUpdateKnowledgeBaseRequest(array $payload = []): UpdateKnowledgeBaseRequest
    {
        return new UpdateKnowledgeBaseRequest($payload);
    }

}

class KnowledgeBaseCore implements \JsonSerializable
{
    /**
     * @property string $displayName Provides a unique and addressable name to be assigned to this Knowledge Base. 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 UpdateKnowledgeBaseRequest implements \JsonSerializable
{
    /**
     * @property string $displayName Provides a unique and addressable name to be assigned to this Knowledge Base. 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;
    }
}

