<?php
/**
 * This code was generated by
 * ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
 *  |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
 *  |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \
 *
 * Twilio - Flex
 * This is the public Twilio REST API.
 *
 * NOTE: This class is auto generated by OpenAPI Generator.
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

namespace Twilio\Rest\FlexApi\V1;

use Twilio\Values;
abstract class CreateFlexInstanceModels
{
    /**
     * @property bool $_default Set newly created conversation service as the default conversation service
    */
    public static function createCreateInstanceRequestBodyConversation(array $payload = []): CreateInstanceRequestBodyConversation
    {
        return new CreateInstanceRequestBodyConversation($payload);
    }

    /**
     * @property CreateInstanceRequestBodyConversation $conversation
    */
    public static function createCreateInstanceRequestBody(array $payload = []): CreateInstanceRequestBody
    {
        return new CreateInstanceRequestBody($payload);
    }

}

class CreateInstanceRequestBodyConversation implements \JsonSerializable
{
    /**
     * @property bool $_default Set newly created conversation service as the default conversation service
    */
        protected $_default;
    public function __construct(array $payload = []) {
        $this->_default = Values::array_get($payload, 'Default');
    }

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

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

class CreateInstanceRequestBody implements \JsonSerializable
{
    /**
     * @property CreateInstanceRequestBodyConversation $conversation
    */
        protected $conversation;
    public function __construct(array $payload = []) {
        $this->conversation = Values::array_get($payload, 'Conversation');
    }

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

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

