<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/gkerecommender/v1/gkerecommender.proto

namespace Google\Cloud\GkeRecommender\V1;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\RepeatedField;

/**
 * Performance requirements for a profile and or model deployment.
 *
 * Generated from protobuf message <code>google.cloud.gkerecommender.v1.PerformanceRequirements</code>
 */
class PerformanceRequirements extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. The target Normalized Time Per Output Token (NTPOT) in
     * milliseconds. NTPOT is calculated as `request_latency /
     * total_output_tokens`. If not provided, this target will not be enforced.
     *
     * Generated from protobuf field <code>optional int32 target_ntpot_milliseconds = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $target_ntpot_milliseconds = null;
    /**
     * Optional. The target Time To First Token (TTFT) in milliseconds. TTFT is
     * the time it takes to generate the first token for a request.  If not
     * provided, this target will not be enforced.
     *
     * Generated from protobuf field <code>optional int32 target_ttft_milliseconds = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $target_ttft_milliseconds = null;
    /**
     * Optional. The target cost for running a profile's model server. If not
     * provided, this requirement will not be enforced.
     *
     * Generated from protobuf field <code>.google.cloud.gkerecommender.v1.Cost target_cost = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $target_cost = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $target_ntpot_milliseconds
     *           Optional. The target Normalized Time Per Output Token (NTPOT) in
     *           milliseconds. NTPOT is calculated as `request_latency /
     *           total_output_tokens`. If not provided, this target will not be enforced.
     *     @type int $target_ttft_milliseconds
     *           Optional. The target Time To First Token (TTFT) in milliseconds. TTFT is
     *           the time it takes to generate the first token for a request.  If not
     *           provided, this target will not be enforced.
     *     @type \Google\Cloud\GkeRecommender\V1\Cost $target_cost
     *           Optional. The target cost for running a profile's model server. If not
     *           provided, this requirement will not be enforced.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Gkerecommender\V1\Gkerecommender::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. The target Normalized Time Per Output Token (NTPOT) in
     * milliseconds. NTPOT is calculated as `request_latency /
     * total_output_tokens`. If not provided, this target will not be enforced.
     *
     * Generated from protobuf field <code>optional int32 target_ntpot_milliseconds = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int
     */
    public function getTargetNtpotMilliseconds()
    {
        return isset($this->target_ntpot_milliseconds) ? $this->target_ntpot_milliseconds : 0;
    }

    public function hasTargetNtpotMilliseconds()
    {
        return isset($this->target_ntpot_milliseconds);
    }

    public function clearTargetNtpotMilliseconds()
    {
        unset($this->target_ntpot_milliseconds);
    }

    /**
     * Optional. The target Normalized Time Per Output Token (NTPOT) in
     * milliseconds. NTPOT is calculated as `request_latency /
     * total_output_tokens`. If not provided, this target will not be enforced.
     *
     * Generated from protobuf field <code>optional int32 target_ntpot_milliseconds = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int $var
     * @return $this
     */
    public function setTargetNtpotMilliseconds($var)
    {
        GPBUtil::checkInt32($var);
        $this->target_ntpot_milliseconds = $var;

        return $this;
    }

    /**
     * Optional. The target Time To First Token (TTFT) in milliseconds. TTFT is
     * the time it takes to generate the first token for a request.  If not
     * provided, this target will not be enforced.
     *
     * Generated from protobuf field <code>optional int32 target_ttft_milliseconds = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int
     */
    public function getTargetTtftMilliseconds()
    {
        return isset($this->target_ttft_milliseconds) ? $this->target_ttft_milliseconds : 0;
    }

    public function hasTargetTtftMilliseconds()
    {
        return isset($this->target_ttft_milliseconds);
    }

    public function clearTargetTtftMilliseconds()
    {
        unset($this->target_ttft_milliseconds);
    }

    /**
     * Optional. The target Time To First Token (TTFT) in milliseconds. TTFT is
     * the time it takes to generate the first token for a request.  If not
     * provided, this target will not be enforced.
     *
     * Generated from protobuf field <code>optional int32 target_ttft_milliseconds = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int $var
     * @return $this
     */
    public function setTargetTtftMilliseconds($var)
    {
        GPBUtil::checkInt32($var);
        $this->target_ttft_milliseconds = $var;

        return $this;
    }

    /**
     * Optional. The target cost for running a profile's model server. If not
     * provided, this requirement will not be enforced.
     *
     * Generated from protobuf field <code>.google.cloud.gkerecommender.v1.Cost target_cost = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\GkeRecommender\V1\Cost|null
     */
    public function getTargetCost()
    {
        return $this->target_cost;
    }

    public function hasTargetCost()
    {
        return isset($this->target_cost);
    }

    public function clearTargetCost()
    {
        unset($this->target_cost);
    }

    /**
     * Optional. The target cost for running a profile's model server. If not
     * provided, this requirement will not be enforced.
     *
     * Generated from protobuf field <code>.google.cloud.gkerecommender.v1.Cost target_cost = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\GkeRecommender\V1\Cost $var
     * @return $this
     */
    public function setTargetCost($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\GkeRecommender\V1\Cost::class);
        $this->target_cost = $var;

        return $this;
    }

}

