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

namespace Google\Cloud\SecurityCenter\V1\Finding;

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

/**
 * Mute information about the finding, including whether the finding has a
 * static mute or any matching dynamic mute rules.
 *
 * Generated from protobuf message <code>google.cloud.securitycenter.v1.Finding.MuteInfo</code>
 */
class MuteInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * If set, the static mute applied to this finding. Static mutes override
     * dynamic mutes. If unset, there is no static mute.
     *
     * Generated from protobuf field <code>.google.cloud.securitycenter.v1.Finding.MuteInfo.StaticMute static_mute = 1;</code>
     */
    protected $static_mute = null;
    /**
     * The list of dynamic mute rules that currently match the finding.
     *
     * Generated from protobuf field <code>repeated .google.cloud.securitycenter.v1.Finding.MuteInfo.DynamicMuteRecord dynamic_mute_records = 2;</code>
     */
    private $dynamic_mute_records;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\SecurityCenter\V1\Finding\MuteInfo\StaticMute $static_mute
     *           If set, the static mute applied to this finding. Static mutes override
     *           dynamic mutes. If unset, there is no static mute.
     *     @type array<\Google\Cloud\SecurityCenter\V1\Finding\MuteInfo\DynamicMuteRecord>|\Google\Protobuf\Internal\RepeatedField $dynamic_mute_records
     *           The list of dynamic mute rules that currently match the finding.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Securitycenter\V1\Finding::initOnce();
        parent::__construct($data);
    }

    /**
     * If set, the static mute applied to this finding. Static mutes override
     * dynamic mutes. If unset, there is no static mute.
     *
     * Generated from protobuf field <code>.google.cloud.securitycenter.v1.Finding.MuteInfo.StaticMute static_mute = 1;</code>
     * @return \Google\Cloud\SecurityCenter\V1\Finding\MuteInfo\StaticMute|null
     */
    public function getStaticMute()
    {
        return $this->static_mute;
    }

    public function hasStaticMute()
    {
        return isset($this->static_mute);
    }

    public function clearStaticMute()
    {
        unset($this->static_mute);
    }

    /**
     * If set, the static mute applied to this finding. Static mutes override
     * dynamic mutes. If unset, there is no static mute.
     *
     * Generated from protobuf field <code>.google.cloud.securitycenter.v1.Finding.MuteInfo.StaticMute static_mute = 1;</code>
     * @param \Google\Cloud\SecurityCenter\V1\Finding\MuteInfo\StaticMute $var
     * @return $this
     */
    public function setStaticMute($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Finding\MuteInfo\StaticMute::class);
        $this->static_mute = $var;

        return $this;
    }

    /**
     * The list of dynamic mute rules that currently match the finding.
     *
     * Generated from protobuf field <code>repeated .google.cloud.securitycenter.v1.Finding.MuteInfo.DynamicMuteRecord dynamic_mute_records = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getDynamicMuteRecords()
    {
        return $this->dynamic_mute_records;
    }

    /**
     * The list of dynamic mute rules that currently match the finding.
     *
     * Generated from protobuf field <code>repeated .google.cloud.securitycenter.v1.Finding.MuteInfo.DynamicMuteRecord dynamic_mute_records = 2;</code>
     * @param array<\Google\Cloud\SecurityCenter\V1\Finding\MuteInfo\DynamicMuteRecord>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setDynamicMuteRecords($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\Finding\MuteInfo\DynamicMuteRecord::class);
        $this->dynamic_mute_records = $arr;

        return $this;
    }

}


