<?php
/**
 * This code was generated by
 * ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
 *  |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
 *  |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \
 *
 * Twilio Conversational Intelligence API
 * The Conversational Intelligence API includes resources to create and manage intelligence configurations, define and run language operators, and retrieve processed conversations and operator results.  * Use the Configurations resource to create and manage intelligence configurations and define rules that control how and when language operators analyze and transform conversations.  * Use the Operators resource to create custom language operators or retrieve Twilio-author and custom operators. * Use the Conversations resource to retrieve conversations processed with an intelligence configuration, and the OperatorResults resource to retrieve language operator results for those conversations.
 *
 * NOTE: This class is auto generated by OpenAPI Generator.
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

namespace Twilio\Rest\Intelligence\V3;

use Twilio\Options;
use Twilio\Values;

abstract class ConversationOptions
{

    /**
     * @param int $pageSize The maximum number of resources to return
     * @param string $pageToken Token for pagination
     * @param \DateTime $createdAtBefore Filter by Conversations created before this timestamp.
     * @param \DateTime $createdAtAfter Filter by Conversations created after this timestamp.
     * @param string $status Filter by Conversation status.
     * @param string $channelId Filters Conversations by the underlying channel resource ID, such as a Call ID or Message ID.
     * @param string[] $channels Filters Conversations that include one or more of the specified communication channels (`OR` match).
     * @param string $conversationConfigurationId The configuration `id` used to generate the Conversation.
     * @param string[] $intelligenceConfigurationIds Filters Conversations activated by one or more of the specified Intelligence Configuration IDs (`OR` match).
     * @param string[] $operatorIds Filters Conversations to those where at least one of the specified Language Operators was executed (`OR` match).
     * @return ReadConversationOptions Options builder
     */
    public static function read(
        
        int $pageSize = Values::INT_NONE,
        string $pageToken = Values::NONE,
        ?\DateTime $createdAtBefore = null,
        ?\DateTime $createdAtAfter = null,
        string $status = Values::NONE,
        string $channelId = Values::NONE,
        array $channels = Values::ARRAY_NONE,
        string $conversationConfigurationId = Values::NONE,
        array $intelligenceConfigurationIds = Values::ARRAY_NONE,
        array $operatorIds = Values::ARRAY_NONE

    ): ReadConversationOptions
    {
        return new ReadConversationOptions(
            $pageSize,
            $pageToken,
            $createdAtBefore,
            $createdAtAfter,
            $status,
            $channelId,
            $channels,
            $conversationConfigurationId,
            $intelligenceConfigurationIds,
            $operatorIds
        );
    }

}


class ReadConversationOptions extends Options
    {
    /**
     * @param int $pageSize The maximum number of resources to return
     * @param string $pageToken Token for pagination
     * @param \DateTime $createdAtBefore Filter by Conversations created before this timestamp.
     * @param \DateTime $createdAtAfter Filter by Conversations created after this timestamp.
     * @param string $status Filter by Conversation status.
     * @param string $channelId Filters Conversations by the underlying channel resource ID, such as a Call ID or Message ID.
     * @param string[] $channels Filters Conversations that include one or more of the specified communication channels (`OR` match).
     * @param string $conversationConfigurationId The configuration `id` used to generate the Conversation.
     * @param string[] $intelligenceConfigurationIds Filters Conversations activated by one or more of the specified Intelligence Configuration IDs (`OR` match).
     * @param string[] $operatorIds Filters Conversations to those where at least one of the specified Language Operators was executed (`OR` match).
     */
    public function __construct(
        
        int $pageSize = Values::INT_NONE,
        string $pageToken = Values::NONE,
        ?\DateTime $createdAtBefore = null,
        ?\DateTime $createdAtAfter = null,
        string $status = Values::NONE,
        string $channelId = Values::NONE,
        array $channels = Values::ARRAY_NONE,
        string $conversationConfigurationId = Values::NONE,
        array $intelligenceConfigurationIds = Values::ARRAY_NONE,
        array $operatorIds = Values::ARRAY_NONE

    ) {
        $this->options['pageSize'] = $pageSize;
        $this->options['pageToken'] = $pageToken;
        $this->options['createdAtBefore'] = $createdAtBefore;
        $this->options['createdAtAfter'] = $createdAtAfter;
        $this->options['status'] = $status;
        $this->options['channelId'] = $channelId;
        $this->options['channels'] = $channels;
        $this->options['conversationConfigurationId'] = $conversationConfigurationId;
        $this->options['intelligenceConfigurationIds'] = $intelligenceConfigurationIds;
        $this->options['operatorIds'] = $operatorIds;
    }

    /**
     * The maximum number of resources to return
     *
     * @param int $pageSize The maximum number of resources to return
     * @return $this Fluent Builder
     */
    public function setPageSize(int $pageSize): self
    {
        $this->options['pageSize'] = $pageSize;
        return $this;
    }

    /**
     * Token for pagination
     *
     * @param string $pageToken Token for pagination
     * @return $this Fluent Builder
     */
    public function setPageToken(string $pageToken): self
    {
        $this->options['pageToken'] = $pageToken;
        return $this;
    }

    /**
     * Filter by Conversations created before this timestamp.
     *
     * @param \DateTime $createdAtBefore Filter by Conversations created before this timestamp.
     * @return $this Fluent Builder
     */
    public function setCreatedAtBefore(\DateTime $createdAtBefore): self
    {
        $this->options['createdAtBefore'] = $createdAtBefore;
        return $this;
    }

    /**
     * Filter by Conversations created after this timestamp.
     *
     * @param \DateTime $createdAtAfter Filter by Conversations created after this timestamp.
     * @return $this Fluent Builder
     */
    public function setCreatedAtAfter(\DateTime $createdAtAfter): self
    {
        $this->options['createdAtAfter'] = $createdAtAfter;
        return $this;
    }

    /**
     * Filter by Conversation status.
     *
     * @param string $status Filter by Conversation status.
     * @return $this Fluent Builder
     */
    public function setStatus(string $status): self
    {
        $this->options['status'] = $status;
        return $this;
    }

    /**
     * Filters Conversations by the underlying channel resource ID, such as a Call ID or Message ID.
     *
     * @param string $channelId Filters Conversations by the underlying channel resource ID, such as a Call ID or Message ID.
     * @return $this Fluent Builder
     */
    public function setChannelId(string $channelId): self
    {
        $this->options['channelId'] = $channelId;
        return $this;
    }

    /**
     * Filters Conversations that include one or more of the specified communication channels (`OR` match).
     *
     * @param string[] $channels Filters Conversations that include one or more of the specified communication channels (`OR` match).
     * @return $this Fluent Builder
     */
    public function setChannels(array $channels): self
    {
        $this->options['channels'] = $channels;
        return $this;
    }

    /**
     * The configuration `id` used to generate the Conversation.
     *
     * @param string $conversationConfigurationId The configuration `id` used to generate the Conversation.
     * @return $this Fluent Builder
     */
    public function setConversationConfigurationId(string $conversationConfigurationId): self
    {
        $this->options['conversationConfigurationId'] = $conversationConfigurationId;
        return $this;
    }

    /**
     * Filters Conversations activated by one or more of the specified Intelligence Configuration IDs (`OR` match).
     *
     * @param string[] $intelligenceConfigurationIds Filters Conversations activated by one or more of the specified Intelligence Configuration IDs (`OR` match).
     * @return $this Fluent Builder
     */
    public function setIntelligenceConfigurationIds(array $intelligenceConfigurationIds): self
    {
        $this->options['intelligenceConfigurationIds'] = $intelligenceConfigurationIds;
        return $this;
    }

    /**
     * Filters Conversations to those where at least one of the specified Language Operators was executed (`OR` match).
     *
     * @param string[] $operatorIds Filters Conversations to those where at least one of the specified Language Operators was executed (`OR` match).
     * @return $this Fluent Builder
     */
    public function setOperatorIds(array $operatorIds): self
    {
        $this->options['operatorIds'] = $operatorIds;
        return $this;
    }

    /**
     * Provide a friendly representation
     *
     * @return string Machine friendly representation
     */
    public function __toString(): string
    {
        $options = \http_build_query(Values::of($this->options), '', ' ');
        return '[Twilio.Intelligence.V3.ReadConversationOptions ' . $options . ']';
    }
}

