<?php
/**
 * This code was generated by
 * ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
 *  |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
 *  |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \
 *
 * Twilio - Numbers
 * 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\Numbers\V1;

use Twilio\Values;
abstract class SenderIdRegistrationModels
{
    /**
     * @property string $regulationId The regulation for this registration.
     * @property int $regulationVersion The regulation version.
     * @property string $friendlyName Human-readable name for the registration.
     * @property string $statusNotificationEmail Email address for registration status notifications.
     * @property string|null $statusCallbackUrl The URL of this resource.
     * @property string $comments Additional comments about the registration.
     * @property string $themeSetId Theme ID for the Compliance Embeddable UI.
     * @property array<string,mixed> $data Registration data organized by section (alphanumericSender, business, useCase, authorizedRepresentative, officer, businessAddress).
    */
    public static function createNumbersV1CreateEmbeddedRegistrationRequest(array $payload = []): NumbersV1CreateEmbeddedRegistrationRequest
    {
        return new NumbersV1CreateEmbeddedRegistrationRequest($payload);
    }

}

class NumbersV1CreateEmbeddedRegistrationRequest implements \JsonSerializable
{
    /**
     * @property string $regulationId The regulation for this registration.
     * @property int $regulationVersion The regulation version.
     * @property string $friendlyName Human-readable name for the registration.
     * @property string $statusNotificationEmail Email address for registration status notifications.
     * @property string|null $statusCallbackUrl The URL of this resource.
     * @property string $comments Additional comments about the registration.
     * @property string $themeSetId Theme ID for the Compliance Embeddable UI.
     * @property array<string,mixed> $data Registration data organized by section (alphanumericSender, business, useCase, authorizedRepresentative, officer, businessAddress).
    */
        protected $regulationId;
        protected $regulationVersion;
        protected $friendlyName;
        protected $statusNotificationEmail;
        protected $statusCallbackUrl;
        protected $comments;
        protected $themeSetId;
        protected $data;
    public function __construct(array $payload = []) {
        $this->regulationId = Values::array_get($payload, 'regulationId');
        $this->regulationVersion = Values::array_get($payload, 'regulationVersion');
        $this->friendlyName = Values::array_get($payload, 'friendlyName');
        $this->statusNotificationEmail = Values::array_get($payload, 'statusNotificationEmail');
        $this->statusCallbackUrl = Values::array_get($payload, 'statusCallbackUrl');
        $this->comments = Values::array_get($payload, 'comments');
        $this->themeSetId = Values::array_get($payload, 'themeSetId');
        $this->data = Values::array_get($payload, 'data');
    }

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

    public function jsonSerialize(): array
    {
        $jsonString = [
            'regulationId' => $this->regulationId,
            'regulationVersion' => $this->regulationVersion,
            'friendlyName' => $this->friendlyName,
            'data' => $this->data
        ];
        if (isset($this->statusNotificationEmail)) {
            $jsonString['statusNotificationEmail'] = $this->statusNotificationEmail;
        }
        if (isset($this->statusCallbackUrl)) {
            $jsonString['statusCallbackUrl'] = $this->statusCallbackUrl;
        }
        if (isset($this->comments)) {
            $jsonString['comments'] = $this->comments;
        }
        if (isset($this->themeSetId)) {
            $jsonString['themeSetId'] = $this->themeSetId;
        }
        return $jsonString;
    }
}

