<?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
{
    /**
     * Describes the type of resource associated with the signature.
     *
     * Generated from protobuf field <code>.google.cloud.securitycenter.v1.Indicator.ProcessSignature.SignatureType signature_type = 8;</code>
     */
    private $signature_type = 0;
    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.
     *     @type int $signature_type
     *           Describes the type of resource associated with the signature.
     * }
     */
    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;
    }

    /**
     * Describes the type of resource associated with the signature.
     *
     * Generated from protobuf field <code>.google.cloud.securitycenter.v1.Indicator.ProcessSignature.SignatureType signature_type = 8;</code>
     * @return int
     */
    public function getSignatureType()
    {
        return $this->signature_type;
    }

    /**
     * Describes the type of resource associated with the signature.
     *
     * Generated from protobuf field <code>.google.cloud.securitycenter.v1.Indicator.ProcessSignature.SignatureType signature_type = 8;</code>
     * @param int $var
     * @return $this
     */
    public function setSignatureType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\Indicator\ProcessSignature\SignatureType::class);
        $this->signature_type = $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);

