<?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\GPBUtil;
use Google\Protobuf\RepeatedField;

/**
 * A group of signal types that specifies what the user is interested in.
 * Used by QueryDatabaseResourceGroups API.
 * Example:
 * signal_type_group {
 *   name = "AVAILABILITY"
 *   types = [SIGNAL_TYPE_NO_PROMOTABLE_REPLICA]
 * }
 *
 * Generated from protobuf message <code>google.cloud.databasecenter.v1beta.SignalTypeGroup</code>
 */
class SignalTypeGroup extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The display name of a signal group.
     *
     * Generated from protobuf field <code>string display_name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $display_name = '';
    /**
     * Optional. List of signal types present in the group.
     *
     * Generated from protobuf field <code>repeated .google.cloud.databasecenter.v1beta.SignalType signal_types = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $signal_types;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $display_name
     *           Required. The display name of a signal group.
     *     @type int[] $signal_types
     *           Optional. List of signal types present in the group.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Databasecenter\V1Beta\Signals::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The display name of a signal group.
     *
     * Generated from protobuf field <code>string display_name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getDisplayName()
    {
        return $this->display_name;
    }

    /**
     * Required. The display name of a signal group.
     *
     * Generated from protobuf field <code>string display_name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setDisplayName($var)
    {
        GPBUtil::checkString($var, True);
        $this->display_name = $var;

        return $this;
    }

    /**
     * Optional. List of signal types present in the group.
     *
     * Generated from protobuf field <code>repeated .google.cloud.databasecenter.v1beta.SignalType signal_types = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return RepeatedField<int>
     */
    public function getSignalTypes()
    {
        return $this->signal_types;
    }

    /**
     * Optional. List of signal types present in the group.
     *
     * Generated from protobuf field <code>repeated .google.cloud.databasecenter.v1beta.SignalType signal_types = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int[] $var
     * @return $this
     */
    public function setSignalTypes($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\DatabaseCenter\V1beta\SignalType::class);
        $this->signal_types = $arr;

        return $this;
    }

}

