<?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\Options;
use Twilio\Values;

abstract class KnowledgeOptions
{



    /**
     * @param int $page The page index. This value is simply for client state.
     * @param int $pageSize The maximum number of items to return per page, maximum of 1000.
     * @param string $pageToken The token for the page of results to retrieve.
     * @return ReadKnowledgeOptions Options builder
     */
    public static function read(
        
        int $page = Values::INT_NONE,
        int $pageSize = Values::INT_NONE,
        string $pageToken = Values::NONE

    ): ReadKnowledgeOptions
    {
        return new ReadKnowledgeOptions(
            $page,
            $pageSize,
            $pageToken
        );
    }

    /**
     * @param bool $refresh When true, re-queues processing for this knowledge resource. Idempotent while the resource is already QUEUED or PROCESSING.
     * @return UpdateKnowledgeOptions Options builder
     */
    public static function update(
        
        bool $refresh = Values::BOOL_NONE

    ): UpdateKnowledgeOptions
    {
        return new UpdateKnowledgeOptions(
            $refresh
        );
    }

}




class ReadKnowledgeOptions extends Options
    {
    /**
     * @param int $page The page index. This value is simply for client state.
     * @param int $pageSize The maximum number of items to return per page, maximum of 1000.
     * @param string $pageToken The token for the page of results to retrieve.
     */
    public function __construct(
        
        int $page = Values::INT_NONE,
        int $pageSize = Values::INT_NONE,
        string $pageToken = Values::NONE

    ) {
        $this->options['page'] = $page;
        $this->options['pageSize'] = $pageSize;
        $this->options['pageToken'] = $pageToken;
    }

    /**
     * The page index. This value is simply for client state.
     *
     * @param int $page The page index. This value is simply for client state.
     * @return $this Fluent Builder
     */
    public function setPage(int $page): self
    {
        $this->options['page'] = $page;
        return $this;
    }

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

    /**
     * The token for the page of results to retrieve.
     *
     * @param string $pageToken The token for the page of results to retrieve.
     * @return $this Fluent Builder
     */
    public function setPageToken(string $pageToken): self
    {
        $this->options['pageToken'] = $pageToken;
        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.Knowledge.V2.ReadKnowledgeOptions ' . $options . ']';
    }
}

class UpdateKnowledgeOptions extends Options
    {
    /**
     * @param bool $refresh When true, re-queues processing for this knowledge resource. Idempotent while the resource is already QUEUED or PROCESSING.
     */
    public function __construct(
        
        bool $refresh = Values::BOOL_NONE

    ) {
        $this->options['refresh'] = $refresh;
    }

    /**
     * When true, re-queues processing for this knowledge resource. Idempotent while the resource is already QUEUED or PROCESSING.
     *
     * @param bool $refresh When true, re-queues processing for this knowledge resource. Idempotent while the resource is already QUEUED or PROCESSING.
     * @return $this Fluent Builder
     */
    public function setRefresh(bool $refresh): self
    {
        $this->options['refresh'] = $refresh;
        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.Knowledge.V2.UpdateKnowledgeOptions ' . $options . ']';
    }
}

