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

namespace Google\Cloud\Deploy\V1;

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

/**
 * Payload proto for "clouddeploy.googleapis.com/jobrun_notification"
 * Platform Log event that describes the failure to send JobRun resource update
 * Pub/Sub notification.
 *
 * Generated from protobuf message <code>google.cloud.deploy.v1.JobRunNotificationEvent</code>
 */
class JobRunNotificationEvent extends \Google\Protobuf\Internal\Message
{
    /**
     * Debug message for when a notification fails to send.
     *
     * Generated from protobuf field <code>string message = 1;</code>
     */
    protected $message = '';
    /**
     * The name of the `JobRun`.
     *
     * Generated from protobuf field <code>string job_run = 2;</code>
     */
    protected $job_run = '';
    /**
     * Unique identifier of the `DeliveryPipeline`.
     *
     * Generated from protobuf field <code>string pipeline_uid = 3;</code>
     */
    protected $pipeline_uid = '';
    /**
     * Unique identifier of the `Release`.
     *
     * Generated from protobuf field <code>string release_uid = 4;</code>
     */
    protected $release_uid = '';
    /**
     * The name of the `Release`.
     *
     * Generated from protobuf field <code>string release = 8;</code>
     */
    protected $release = '';
    /**
     * Unique identifier of the `Rollout`.
     *
     * Generated from protobuf field <code>string rollout_uid = 5;</code>
     */
    protected $rollout_uid = '';
    /**
     * The name of the `Rollout`.
     *
     * Generated from protobuf field <code>string rollout = 9;</code>
     */
    protected $rollout = '';
    /**
     * ID of the `Target`.
     *
     * Generated from protobuf field <code>string target_id = 6;</code>
     */
    protected $target_id = '';
    /**
     * Type of this notification, e.g. for a Pub/Sub failure.
     *
     * Generated from protobuf field <code>.google.cloud.deploy.v1.Type type = 7;</code>
     */
    protected $type = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $message
     *           Debug message for when a notification fails to send.
     *     @type string $job_run
     *           The name of the `JobRun`.
     *     @type string $pipeline_uid
     *           Unique identifier of the `DeliveryPipeline`.
     *     @type string $release_uid
     *           Unique identifier of the `Release`.
     *     @type string $release
     *           The name of the `Release`.
     *     @type string $rollout_uid
     *           Unique identifier of the `Rollout`.
     *     @type string $rollout
     *           The name of the `Rollout`.
     *     @type string $target_id
     *           ID of the `Target`.
     *     @type int $type
     *           Type of this notification, e.g. for a Pub/Sub failure.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Deploy\V1\JobrunNotificationPayload::initOnce();
        parent::__construct($data);
    }

    /**
     * Debug message for when a notification fails to send.
     *
     * Generated from protobuf field <code>string message = 1;</code>
     * @return string
     */
    public function getMessage()
    {
        return $this->message;
    }

    /**
     * Debug message for when a notification fails to send.
     *
     * Generated from protobuf field <code>string message = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setMessage($var)
    {
        GPBUtil::checkString($var, True);
        $this->message = $var;

        return $this;
    }

    /**
     * The name of the `JobRun`.
     *
     * Generated from protobuf field <code>string job_run = 2;</code>
     * @return string
     */
    public function getJobRun()
    {
        return $this->job_run;
    }

    /**
     * The name of the `JobRun`.
     *
     * Generated from protobuf field <code>string job_run = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setJobRun($var)
    {
        GPBUtil::checkString($var, True);
        $this->job_run = $var;

        return $this;
    }

    /**
     * Unique identifier of the `DeliveryPipeline`.
     *
     * Generated from protobuf field <code>string pipeline_uid = 3;</code>
     * @return string
     */
    public function getPipelineUid()
    {
        return $this->pipeline_uid;
    }

    /**
     * Unique identifier of the `DeliveryPipeline`.
     *
     * Generated from protobuf field <code>string pipeline_uid = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setPipelineUid($var)
    {
        GPBUtil::checkString($var, True);
        $this->pipeline_uid = $var;

        return $this;
    }

    /**
     * Unique identifier of the `Release`.
     *
     * Generated from protobuf field <code>string release_uid = 4;</code>
     * @return string
     */
    public function getReleaseUid()
    {
        return $this->release_uid;
    }

    /**
     * Unique identifier of the `Release`.
     *
     * Generated from protobuf field <code>string release_uid = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setReleaseUid($var)
    {
        GPBUtil::checkString($var, True);
        $this->release_uid = $var;

        return $this;
    }

    /**
     * The name of the `Release`.
     *
     * Generated from protobuf field <code>string release = 8;</code>
     * @return string
     */
    public function getRelease()
    {
        return $this->release;
    }

    /**
     * The name of the `Release`.
     *
     * Generated from protobuf field <code>string release = 8;</code>
     * @param string $var
     * @return $this
     */
    public function setRelease($var)
    {
        GPBUtil::checkString($var, True);
        $this->release = $var;

        return $this;
    }

    /**
     * Unique identifier of the `Rollout`.
     *
     * Generated from protobuf field <code>string rollout_uid = 5;</code>
     * @return string
     */
    public function getRolloutUid()
    {
        return $this->rollout_uid;
    }

    /**
     * Unique identifier of the `Rollout`.
     *
     * Generated from protobuf field <code>string rollout_uid = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setRolloutUid($var)
    {
        GPBUtil::checkString($var, True);
        $this->rollout_uid = $var;

        return $this;
    }

    /**
     * The name of the `Rollout`.
     *
     * Generated from protobuf field <code>string rollout = 9;</code>
     * @return string
     */
    public function getRollout()
    {
        return $this->rollout;
    }

    /**
     * The name of the `Rollout`.
     *
     * Generated from protobuf field <code>string rollout = 9;</code>
     * @param string $var
     * @return $this
     */
    public function setRollout($var)
    {
        GPBUtil::checkString($var, True);
        $this->rollout = $var;

        return $this;
    }

    /**
     * ID of the `Target`.
     *
     * Generated from protobuf field <code>string target_id = 6;</code>
     * @return string
     */
    public function getTargetId()
    {
        return $this->target_id;
    }

    /**
     * ID of the `Target`.
     *
     * Generated from protobuf field <code>string target_id = 6;</code>
     * @param string $var
     * @return $this
     */
    public function setTargetId($var)
    {
        GPBUtil::checkString($var, True);
        $this->target_id = $var;

        return $this;
    }

    /**
     * Type of this notification, e.g. for a Pub/Sub failure.
     *
     * Generated from protobuf field <code>.google.cloud.deploy.v1.Type type = 7;</code>
     * @return int
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * Type of this notification, e.g. for a Pub/Sub failure.
     *
     * Generated from protobuf field <code>.google.cloud.deploy.v1.Type type = 7;</code>
     * @param int $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Deploy\V1\Type::class);
        $this->type = $var;

        return $this;
    }

}

