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

namespace Google\Cloud\DatabaseCenter\V1beta;

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

/**
 * A group of signals and their counts.
 *
 * Generated from protobuf message <code>google.cloud.databasecenter.v1beta.SignalGroup</code>
 */
class SignalGroup extends \Google\Protobuf\Internal\Message
{
    /**
     * Title of a signal group corresponding to the request.
     *
     * Generated from protobuf field <code>string display_name = 1;</code>
     */
    protected $display_name = '';
    /**
     * When applied to a DatabaseResource represents count of issues associated
     * with the resource. A signal is an issue when its SignalStatus field is
     * set to SIGNAL_STATUS_ISSUE.
     *
     * Generated from protobuf field <code>int32 issue_count = 2;</code>
     */
    protected $issue_count = 0;
    /**
     * List of signals present in the group and associated with the resource.
     * Only applies to a DatabaseResource.
     *
     * Generated from protobuf field <code>repeated .google.cloud.databasecenter.v1beta.Signal signals = 3;</code>
     */
    private $signals;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $display_name
     *           Title of a signal group corresponding to the request.
     *     @type int $issue_count
     *           When applied to a DatabaseResource represents count of issues associated
     *           with the resource. A signal is an issue when its SignalStatus field is
     *           set to SIGNAL_STATUS_ISSUE.
     *     @type array<\Google\Cloud\DatabaseCenter\V1beta\Signal>|\Google\Protobuf\Internal\RepeatedField $signals
     *           List of signals present in the group and associated with the resource.
     *           Only applies to a DatabaseResource.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Databasecenter\V1Beta\Signals::initOnce();
        parent::__construct($data);
    }

    /**
     * Title of a signal group corresponding to the request.
     *
     * Generated from protobuf field <code>string display_name = 1;</code>
     * @return string
     */
    public function getDisplayName()
    {
        return $this->display_name;
    }

    /**
     * Title of a signal group corresponding to the request.
     *
     * Generated from protobuf field <code>string display_name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setDisplayName($var)
    {
        GPBUtil::checkString($var, True);
        $this->display_name = $var;

        return $this;
    }

    /**
     * When applied to a DatabaseResource represents count of issues associated
     * with the resource. A signal is an issue when its SignalStatus field is
     * set to SIGNAL_STATUS_ISSUE.
     *
     * Generated from protobuf field <code>int32 issue_count = 2;</code>
     * @return int
     */
    public function getIssueCount()
    {
        return $this->issue_count;
    }

    /**
     * When applied to a DatabaseResource represents count of issues associated
     * with the resource. A signal is an issue when its SignalStatus field is
     * set to SIGNAL_STATUS_ISSUE.
     *
     * Generated from protobuf field <code>int32 issue_count = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setIssueCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->issue_count = $var;

        return $this;
    }

    /**
     * List of signals present in the group and associated with the resource.
     * Only applies to a DatabaseResource.
     *
     * Generated from protobuf field <code>repeated .google.cloud.databasecenter.v1beta.Signal signals = 3;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getSignals()
    {
        return $this->signals;
    }

    /**
     * List of signals present in the group and associated with the resource.
     * Only applies to a DatabaseResource.
     *
     * Generated from protobuf field <code>repeated .google.cloud.databasecenter.v1beta.Signal signals = 3;</code>
     * @param array<\Google\Cloud\DatabaseCenter\V1beta\Signal>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setSignals($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DatabaseCenter\V1beta\Signal::class);
        $this->signals = $arr;

        return $this;
    }

}

