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

namespace Google\Cloud\Build\V1;

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

/**
 * ReceiveTriggerWebhookRequest [Experimental] is the request object accepted by
 * the ReceiveTriggerWebhook method.
 *
 * Generated from protobuf message <code>google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest</code>
 */
class ReceiveTriggerWebhookRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * HTTP request body.
     *
     * Generated from protobuf field <code>.google.api.HttpBody body = 1;</code>
     */
    private $body = null;
    /**
     * Project in which the specified trigger lives
     *
     * Generated from protobuf field <code>string project_id = 2;</code>
     */
    private $project_id = '';
    /**
     * Name of the trigger to run the payload against
     *
     * Generated from protobuf field <code>string trigger = 3;</code>
     */
    private $trigger = '';
    /**
     * Secret token used for authorization if an OAuth token isn't provided.
     *
     * Generated from protobuf field <code>string secret = 4;</code>
     */
    private $secret = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Api\HttpBody $body
     *           HTTP request body.
     *     @type string $project_id
     *           Project in which the specified trigger lives
     *     @type string $trigger
     *           Name of the trigger to run the payload against
     *     @type string $secret
     *           Secret token used for authorization if an OAuth token isn't provided.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Devtools\Cloudbuild\V1\Cloudbuild::initOnce();
        parent::__construct($data);
    }

    /**
     * HTTP request body.
     *
     * Generated from protobuf field <code>.google.api.HttpBody body = 1;</code>
     * @return \Google\Api\HttpBody|null
     */
    public function getBody()
    {
        return isset($this->body) ? $this->body : null;
    }

    public function hasBody()
    {
        return isset($this->body);
    }

    public function clearBody()
    {
        unset($this->body);
    }

    /**
     * HTTP request body.
     *
     * Generated from protobuf field <code>.google.api.HttpBody body = 1;</code>
     * @param \Google\Api\HttpBody $var
     * @return $this
     */
    public function setBody($var)
    {
        GPBUtil::checkMessage($var, \Google\Api\HttpBody::class);
        $this->body = $var;

        return $this;
    }

    /**
     * Project in which the specified trigger lives
     *
     * Generated from protobuf field <code>string project_id = 2;</code>
     * @return string
     */
    public function getProjectId()
    {
        return $this->project_id;
    }

    /**
     * Project in which the specified trigger lives
     *
     * Generated from protobuf field <code>string project_id = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setProjectId($var)
    {
        GPBUtil::checkString($var, True);
        $this->project_id = $var;

        return $this;
    }

    /**
     * Name of the trigger to run the payload against
     *
     * Generated from protobuf field <code>string trigger = 3;</code>
     * @return string
     */
    public function getTrigger()
    {
        return $this->trigger;
    }

    /**
     * Name of the trigger to run the payload against
     *
     * Generated from protobuf field <code>string trigger = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setTrigger($var)
    {
        GPBUtil::checkString($var, True);
        $this->trigger = $var;

        return $this;
    }

    /**
     * Secret token used for authorization if an OAuth token isn't provided.
     *
     * Generated from protobuf field <code>string secret = 4;</code>
     * @return string
     */
    public function getSecret()
    {
        return $this->secret;
    }

    /**
     * Secret token used for authorization if an OAuth token isn't provided.
     *
     * Generated from protobuf field <code>string secret = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setSecret($var)
    {
        GPBUtil::checkString($var, True);
        $this->secret = $var;

        return $this;
    }

}

