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

namespace Google\Cloud\Deploy\V1\Release;

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

/**
 * Details of rendering for a single target.
 *
 * Generated from protobuf message <code>google.cloud.deploy.v1.Release.TargetRender</code>
 */
class TargetRender extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. The resource name of the Cloud Build `Build` object that is used to
     * render the manifest for this target. Format is
     * `projects/{project}/locations/{location}/builds/{build}`.
     *
     * Generated from protobuf field <code>string rendering_build = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     */
    private $rendering_build = '';
    /**
     * Output only. Current state of the render operation for this Target.
     *
     * Generated from protobuf field <code>.google.cloud.deploy.v1.Release.TargetRender.TargetRenderState rendering_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $rendering_state = 0;
    /**
     * Output only. Reason this render failed. This will always be unspecified while the
     * render in progress.
     *
     * Generated from protobuf field <code>.google.cloud.deploy.v1.Release.TargetRender.FailureCause failure_cause = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $failure_cause = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $rendering_build
     *           Output only. The resource name of the Cloud Build `Build` object that is used to
     *           render the manifest for this target. Format is
     *           `projects/{project}/locations/{location}/builds/{build}`.
     *     @type int $rendering_state
     *           Output only. Current state of the render operation for this Target.
     *     @type int $failure_cause
     *           Output only. Reason this render failed. This will always be unspecified while the
     *           render in progress.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Deploy\V1\CloudDeploy::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. The resource name of the Cloud Build `Build` object that is used to
     * render the manifest for this target. Format is
     * `projects/{project}/locations/{location}/builds/{build}`.
     *
     * Generated from protobuf field <code>string rendering_build = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getRenderingBuild()
    {
        return $this->rendering_build;
    }

    /**
     * Output only. The resource name of the Cloud Build `Build` object that is used to
     * render the manifest for this target. Format is
     * `projects/{project}/locations/{location}/builds/{build}`.
     *
     * Generated from protobuf field <code>string rendering_build = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setRenderingBuild($var)
    {
        GPBUtil::checkString($var, True);
        $this->rendering_build = $var;

        return $this;
    }

    /**
     * Output only. Current state of the render operation for this Target.
     *
     * Generated from protobuf field <code>.google.cloud.deploy.v1.Release.TargetRender.TargetRenderState rendering_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getRenderingState()
    {
        return $this->rendering_state;
    }

    /**
     * Output only. Current state of the render operation for this Target.
     *
     * Generated from protobuf field <code>.google.cloud.deploy.v1.Release.TargetRender.TargetRenderState rendering_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setRenderingState($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Deploy\V1\Release\TargetRender\TargetRenderState::class);
        $this->rendering_state = $var;

        return $this;
    }

    /**
     * Output only. Reason this render failed. This will always be unspecified while the
     * render in progress.
     *
     * Generated from protobuf field <code>.google.cloud.deploy.v1.Release.TargetRender.FailureCause failure_cause = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getFailureCause()
    {
        return $this->failure_cause;
    }

    /**
     * Output only. Reason this render failed. This will always be unspecified while the
     * render in progress.
     *
     * Generated from protobuf field <code>.google.cloud.deploy.v1.Release.TargetRender.FailureCause failure_cause = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setFailureCause($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Deploy\V1\Release\TargetRender\FailureCause::class);
        $this->failure_cause = $var;

        return $this;
    }

}


