<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: src/proto/grpc/testing/control.proto

namespace Grpc\Testing;

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

/**
 * <pre>
 * Results of a single benchmark scenario.
 * </pre>
 *
 * Protobuf type <code>grpc.testing.ScenarioResult</code>
 */
class ScenarioResult extends \Google\Protobuf\Internal\Message
{
    /**
     * <pre>
     * Inputs used to run the scenario.
     * </pre>
     *
     * <code>.grpc.testing.Scenario scenario = 1;</code>
     */
    private $scenario = null;
    /**
     * <pre>
     * Histograms from all clients merged into one histogram.
     * </pre>
     *
     * <code>.grpc.testing.HistogramData latencies = 2;</code>
     */
    private $latencies = null;
    /**
     * <pre>
     * Client stats for each client
     * </pre>
     *
     * <code>repeated .grpc.testing.ClientStats client_stats = 3;</code>
     */
    private $client_stats;
    /**
     * <pre>
     * Server stats for each server
     * </pre>
     *
     * <code>repeated .grpc.testing.ServerStats server_stats = 4;</code>
     */
    private $server_stats;
    /**
     * <pre>
     * Number of cores available to each server
     * </pre>
     *
     * <code>repeated int32 server_cores = 5;</code>
     */
    private $server_cores;
    /**
     * <pre>
     * An after-the-fact computed summary
     * </pre>
     *
     * <code>.grpc.testing.ScenarioResultSummary summary = 6;</code>
     */
    private $summary = null;
    /**
     * <pre>
     * Information on success or failure of each worker
     * </pre>
     *
     * <code>repeated bool client_success = 7;</code>
     */
    private $client_success;
    /**
     * <code>repeated bool server_success = 8;</code>
     */
    private $server_success;
    /**
     * <pre>
     * Number of failed requests (one row per status code seen)
     * </pre>
     *
     * <code>repeated .grpc.testing.RequestResultCount request_results = 9;</code>
     */
    private $request_results;

    public function __construct() {
        \GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
        parent::__construct();
    }

    /**
     * <pre>
     * Inputs used to run the scenario.
     * </pre>
     *
     * <code>.grpc.testing.Scenario scenario = 1;</code>
     */
    public function getScenario()
    {
        return $this->scenario;
    }

    /**
     * <pre>
     * Inputs used to run the scenario.
     * </pre>
     *
     * <code>.grpc.testing.Scenario scenario = 1;</code>
     */
    public function setScenario(&$var)
    {
        GPBUtil::checkMessage($var, \Grpc\Testing\Scenario::class);
        $this->scenario = $var;
    }

    /**
     * <pre>
     * Histograms from all clients merged into one histogram.
     * </pre>
     *
     * <code>.grpc.testing.HistogramData latencies = 2;</code>
     */
    public function getLatencies()
    {
        return $this->latencies;
    }

    /**
     * <pre>
     * Histograms from all clients merged into one histogram.
     * </pre>
     *
     * <code>.grpc.testing.HistogramData latencies = 2;</code>
     */
    public function setLatencies(&$var)
    {
        GPBUtil::checkMessage($var, \Grpc\Testing\HistogramData::class);
        $this->latencies = $var;
    }

    /**
     * <pre>
     * Client stats for each client
     * </pre>
     *
     * <code>repeated .grpc.testing.ClientStats client_stats = 3;</code>
     */
    public function getClientStats()
    {
        return $this->client_stats;
    }

    /**
     * <pre>
     * Client stats for each client
     * </pre>
     *
     * <code>repeated .grpc.testing.ClientStats client_stats = 3;</code>
     */
    public function setClientStats(&$var)
    {
        GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\ClientStats::class);
        $this->client_stats = $var;
    }

    /**
     * <pre>
     * Server stats for each server
     * </pre>
     *
     * <code>repeated .grpc.testing.ServerStats server_stats = 4;</code>
     */
    public function getServerStats()
    {
        return $this->server_stats;
    }

    /**
     * <pre>
     * Server stats for each server
     * </pre>
     *
     * <code>repeated .grpc.testing.ServerStats server_stats = 4;</code>
     */
    public function setServerStats(&$var)
    {
        GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\ServerStats::class);
        $this->server_stats = $var;
    }

    /**
     * <pre>
     * Number of cores available to each server
     * </pre>
     *
     * <code>repeated int32 server_cores = 5;</code>
     */
    public function getServerCores()
    {
        return $this->server_cores;
    }

    /**
     * <pre>
     * Number of cores available to each server
     * </pre>
     *
     * <code>repeated int32 server_cores = 5;</code>
     */
    public function setServerCores(&$var)
    {
        GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
        $this->server_cores = $var;
    }

    /**
     * <pre>
     * An after-the-fact computed summary
     * </pre>
     *
     * <code>.grpc.testing.ScenarioResultSummary summary = 6;</code>
     */
    public function getSummary()
    {
        return $this->summary;
    }

    /**
     * <pre>
     * An after-the-fact computed summary
     * </pre>
     *
     * <code>.grpc.testing.ScenarioResultSummary summary = 6;</code>
     */
    public function setSummary(&$var)
    {
        GPBUtil::checkMessage($var, \Grpc\Testing\ScenarioResultSummary::class);
        $this->summary = $var;
    }

    /**
     * <pre>
     * Information on success or failure of each worker
     * </pre>
     *
     * <code>repeated bool client_success = 7;</code>
     */
    public function getClientSuccess()
    {
        return $this->client_success;
    }

    /**
     * <pre>
     * Information on success or failure of each worker
     * </pre>
     *
     * <code>repeated bool client_success = 7;</code>
     */
    public function setClientSuccess(&$var)
    {
        GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::BOOL);
        $this->client_success = $var;
    }

    /**
     * <code>repeated bool server_success = 8;</code>
     */
    public function getServerSuccess()
    {
        return $this->server_success;
    }

    /**
     * <code>repeated bool server_success = 8;</code>
     */
    public function setServerSuccess(&$var)
    {
        GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::BOOL);
        $this->server_success = $var;
    }

    /**
     * <pre>
     * Number of failed requests (one row per status code seen)
     * </pre>
     *
     * <code>repeated .grpc.testing.RequestResultCount request_results = 9;</code>
     */
    public function getRequestResults()
    {
        return $this->request_results;
    }

    /**
     * <pre>
     * Number of failed requests (one row per status code seen)
     * </pre>
     *
     * <code>repeated .grpc.testing.RequestResultCount request_results = 9;</code>
     */
    public function setRequestResults(&$var)
    {
        GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\RequestResultCount::class);
        $this->request_results = $var;
    }

}

