<?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 ImportModels
{
    /**
     * @property string $columnName The name of the column in the CSV header
     * @property string $traitGroup The trait group to which this trait belongs
     * @property string $traitName The name of the trait in the trait group
    */
    public static function createColumnMappingItem(array $payload = []): ColumnMappingItem
    {
        return new ColumnMappingItem($payload);
    }

    /**
     * @property string $filename The name of the file to generate a presigned URL
     * @property int $fileSize The size of the file in bytes (1 byte to 100 MiB)
     * @property ColumnMappingItem[] $columnMappings Mappings of CSV header columns to traits' fields
    */
    public static function createCreateProfilesImportV2Request(array $payload = []): CreateProfilesImportV2Request
    {
        return new CreateProfilesImportV2Request($payload);
    }

    /**
     * @property int $errors Total count of errors encountered during import
     * @property int $warnings Total count of warnings encountered during import
    */
    public static function createFetchProfileImportV2200ResponseSummary(array $payload = []): FetchProfileImportV2200ResponseSummary
    {
        return new FetchProfileImportV2200ResponseSummary($payload);
    }

}

class ColumnMappingItem implements \JsonSerializable
{
    /**
     * @property string $columnName The name of the column in the CSV header
     * @property string $traitGroup The trait group to which this trait belongs
     * @property string $traitName The name of the trait in the trait group
    */
        protected $columnName;
        protected $traitGroup;
        protected $traitName;
    public function __construct(array $payload = []) {
        $this->columnName = Values::array_get($payload, 'columnName');
        $this->traitGroup = Values::array_get($payload, 'traitGroup');
        $this->traitName = Values::array_get($payload, 'traitName');
    }

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

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

class CreateProfilesImportV2Request implements \JsonSerializable
{
    /**
     * @property string $filename The name of the file to generate a presigned URL
     * @property int $fileSize The size of the file in bytes (1 byte to 100 MiB)
     * @property ColumnMappingItem[] $columnMappings Mappings of CSV header columns to traits' fields
    */
        protected $filename;
        protected $fileSize;
        protected $columnMappings;
    public function __construct(array $payload = []) {
        $this->filename = Values::array_get($payload, 'filename');
        $this->fileSize = Values::array_get($payload, 'fileSize');
        $this->columnMappings = Values::array_get($payload, 'columnMappings');
    }

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

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

class FetchProfileImportV2200ResponseSummary implements \JsonSerializable
{
    /**
     * @property int $errors Total count of errors encountered during import
     * @property int $warnings Total count of warnings encountered during import
    */
        protected $errors;
        protected $warnings;
    public function __construct(array $payload = []) {
        $this->errors = Values::array_get($payload, 'errors');
        $this->warnings = Values::array_get($payload, 'warnings');
    }

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

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

