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

namespace Google\Cloud\Deploy\V1;

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

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

    /**
     * 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 $pipeline_uid
     *           Unique identifier of the `DeliveryPipeline`.
     *     @type string $release_uid
     *           Unique identifier of the `Release`.
     *     @type string $rollout
     *           The name of the `Rollout`.
     *     @type int $type
     *           Type of this notification, e.g. for a Pub/Sub failure.
     *     @type string $target_id
     *           ID of the `Target` that the rollout is deployed to.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Deploy\V1\RolloutNotificationPayload::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;
    }

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

    /**
     * Unique identifier of the `DeliveryPipeline`.
     *
     * Generated from protobuf field <code>string pipeline_uid = 2;</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 = 3;</code>
     * @return string
     */
    public function getReleaseUid()
    {
        return $this->release_uid;
    }

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

        return $this;
    }

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

    /**
     * The name of the `Rollout`.
     *
     * Generated from protobuf field <code>string rollout = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setRollout($var)
    {
        GPBUtil::checkString($var, True);
        $this->rollout = $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 = 5;</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 = 5;</code>
     * @param int $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Deploy\V1\Type::class);
        $this->type = $var;

        return $this;
    }

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

    /**
     * ID of the `Target` that the rollout is deployed to.
     *
     * 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;
    }

}

