<?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 creating a finding.
 *
 * Generated from protobuf message <code>google.cloud.securitycenter.v1.CreateFindingRequest</code>
 */
class CreateFindingRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Resource name of the new finding's parent. Its format should be
     * "organizations/[organization_id]/sources/[source_id]".
     *
     * Generated from protobuf field <code>string parent = 1;</code>
     */
    private $parent = '';
    /**
     * Unique identifier provided by the client within the parent scope.
     * It must be alphanumeric and less than or equal to 32 characters and
     * greater than 0 characters in length.
     *
     * Generated from protobuf field <code>string finding_id = 2;</code>
     */
    private $finding_id = '';
    /**
     * The Finding being created. The name and security_marks will be ignored as
     * they are both output only fields on this resource.
     *
     * Generated from protobuf field <code>.google.cloud.securitycenter.v1.Finding finding = 3;</code>
     */
    private $finding = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Resource name of the new finding's parent. Its format should be
     *           "organizations/[organization_id]/sources/[source_id]".
     *     @type string $finding_id
     *           Unique identifier provided by the client within the parent scope.
     *           It must be alphanumeric and less than or equal to 32 characters and
     *           greater than 0 characters in length.
     *     @type \Google\Cloud\SecurityCenter\V1\Finding $finding
     *           The Finding being created. The name and security_marks will be ignored as
     *           they are both output only fields on this resource.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce();
        parent::__construct($data);
    }

    /**
     * Resource name of the new finding's parent. Its format should be
     * "organizations/[organization_id]/sources/[source_id]".
     *
     * Generated from protobuf field <code>string parent = 1;</code>
     * @return string
     */
    public function getParent()
    {
        return $this->parent;
    }

    /**
     * Resource name of the new finding's parent. Its format should be
     * "organizations/[organization_id]/sources/[source_id]".
     *
     * Generated from protobuf field <code>string parent = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setParent($var)
    {
        GPBUtil::checkString($var, True);
        $this->parent = $var;

        return $this;
    }

    /**
     * Unique identifier provided by the client within the parent scope.
     * It must be alphanumeric and less than or equal to 32 characters and
     * greater than 0 characters in length.
     *
     * Generated from protobuf field <code>string finding_id = 2;</code>
     * @return string
     */
    public function getFindingId()
    {
        return $this->finding_id;
    }

    /**
     * Unique identifier provided by the client within the parent scope.
     * It must be alphanumeric and less than or equal to 32 characters and
     * greater than 0 characters in length.
     *
     * Generated from protobuf field <code>string finding_id = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setFindingId($var)
    {
        GPBUtil::checkString($var, True);
        $this->finding_id = $var;

        return $this;
    }

    /**
     * The Finding being created. The name and security_marks will be ignored as
     * they are both output only fields on this resource.
     *
     * Generated from protobuf field <code>.google.cloud.securitycenter.v1.Finding finding = 3;</code>
     * @return \Google\Cloud\SecurityCenter\V1\Finding
     */
    public function getFinding()
    {
        return $this->finding;
    }

    /**
     * The Finding being created. The name and security_marks will be ignored as
     * they are both output only fields on this resource.
     *
     * Generated from protobuf field <code>.google.cloud.securitycenter.v1.Finding finding = 3;</code>
     * @param \Google\Cloud\SecurityCenter\V1\Finding $var
     * @return $this
     */
    public function setFinding($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Finding::class);
        $this->finding = $var;

        return $this;
    }

}

