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

namespace Google\Cloud\SecurityCenter\V1\Indicator;

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

/**
 * Indicates what signature matched this process.
 *
 * Generated from protobuf message <code>google.cloud.securitycenter.v1.Indicator.ProcessSignature</code>
 */
class ProcessSignature extends \Google\Protobuf\Internal\Message
{
    protected $signature;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\SecurityCenter\V1\Indicator\ProcessSignature\MemoryHashSignature $memory_hash_signature
     *           Signature indicating that a binary family was matched.
     *     @type \Google\Cloud\SecurityCenter\V1\Indicator\ProcessSignature\YaraRuleSignature $yara_rule_signature
     *           Signature indicating that a YARA rule was matched.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Securitycenter\V1\Indicator::initOnce();
        parent::__construct($data);
    }

    /**
     * Signature indicating that a binary family was matched.
     *
     * Generated from protobuf field <code>.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6;</code>
     * @return \Google\Cloud\SecurityCenter\V1\Indicator\ProcessSignature\MemoryHashSignature|null
     */
    public function getMemoryHashSignature()
    {
        return $this->readOneof(6);
    }

    public function hasMemoryHashSignature()
    {
        return $this->hasOneof(6);
    }

    /**
     * Signature indicating that a binary family was matched.
     *
     * Generated from protobuf field <code>.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6;</code>
     * @param \Google\Cloud\SecurityCenter\V1\Indicator\ProcessSignature\MemoryHashSignature $var
     * @return $this
     */
    public function setMemoryHashSignature($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Indicator\ProcessSignature\MemoryHashSignature::class);
        $this->writeOneof(6, $var);

        return $this;
    }

    /**
     * Signature indicating that a YARA rule was matched.
     *
     * Generated from protobuf field <code>.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7;</code>
     * @return \Google\Cloud\SecurityCenter\V1\Indicator\ProcessSignature\YaraRuleSignature|null
     */
    public function getYaraRuleSignature()
    {
        return $this->readOneof(7);
    }

    public function hasYaraRuleSignature()
    {
        return $this->hasOneof(7);
    }

    /**
     * Signature indicating that a YARA rule was matched.
     *
     * Generated from protobuf field <code>.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7;</code>
     * @param \Google\Cloud\SecurityCenter\V1\Indicator\ProcessSignature\YaraRuleSignature $var
     * @return $this
     */
    public function setYaraRuleSignature($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Indicator\ProcessSignature\YaraRuleSignature::class);
        $this->writeOneof(7, $var);

        return $this;
    }

    /**
     * @return string
     */
    public function getSignature()
    {
        return $this->whichOneof("signature");
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProcessSignature::class, \Google\Cloud\SecurityCenter\V1\Indicator_ProcessSignature::class);

