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

namespace Google\Cloud\SecurityCenter\V1;

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

/**
 * Request message for updating a source.
 *
 * Generated from protobuf message <code>google.cloud.securitycenter.v1.UpdateSourceRequest</code>
 */
class UpdateSourceRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * The source resource to update.
     *
     * Generated from protobuf field <code>.google.cloud.securitycenter.v1.Source source = 1;</code>
     */
    private $source = null;
    /**
     * The FieldMask to use when updating the source resource.
     * If empty all mutable fields will be updated.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 2;</code>
     */
    private $update_mask = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\SecurityCenter\V1\Source $source
     *           The source resource to update.
     *     @type \Google\Protobuf\FieldMask $update_mask
     *           The FieldMask to use when updating the source resource.
     *           If empty all mutable fields will be updated.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce();
        parent::__construct($data);
    }

    /**
     * The source resource to update.
     *
     * Generated from protobuf field <code>.google.cloud.securitycenter.v1.Source source = 1;</code>
     * @return \Google\Cloud\SecurityCenter\V1\Source
     */
    public function getSource()
    {
        return $this->source;
    }

    /**
     * The source resource to update.
     *
     * Generated from protobuf field <code>.google.cloud.securitycenter.v1.Source source = 1;</code>
     * @param \Google\Cloud\SecurityCenter\V1\Source $var
     * @return $this
     */
    public function setSource($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Source::class);
        $this->source = $var;

        return $this;
    }

    /**
     * The FieldMask to use when updating the source resource.
     * If empty all mutable fields will be updated.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 2;</code>
     * @return \Google\Protobuf\FieldMask
     */
    public function getUpdateMask()
    {
        return $this->update_mask;
    }

    /**
     * The FieldMask to use when updating the source resource.
     * If empty all mutable fields will be updated.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 2;</code>
     * @param \Google\Protobuf\FieldMask $var
     * @return $this
     */
    public function setUpdateMask($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
        $this->update_mask = $var;

        return $this;
    }

}

