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

namespace Google\Cloud\ParameterManager\V1;

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

/**
 * Message describing ParameterVersion resource
 *
 * Generated from protobuf message <code>google.cloud.parametermanager.v1.ParameterVersion</code>
 */
class ParameterVersion extends \Google\Protobuf\Internal\Message
{
    /**
     * Identifier. [Output only] The resource name of the ParameterVersion in the
     * format `projects/&#42;&#47;locations/&#42;&#47;parameters/&#42;&#47;versions/&#42;`.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     */
    protected $name = '';
    /**
     * Output only. [Output only] Create time stamp
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $create_time = null;
    /**
     * Output only. [Output only] Update time stamp
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $update_time = null;
    /**
     * Optional. Disabled boolean to determine if a ParameterVersion acts as a
     * metadata only resource (payload is never returned if disabled is true). If
     * true any calls will always default to BASIC view even if the user
     * explicitly passes FULL view as part of the request. A render call on a
     * disabled resource fails with an error. Default value is False.
     *
     * Generated from protobuf field <code>bool disabled = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $disabled = false;
    /**
     * Required. Immutable. Payload content of a ParameterVersion resource.  This
     * is only returned when the request provides the View value of FULL (default
     * for GET request).
     *
     * Generated from protobuf field <code>.google.cloud.parametermanager.v1.ParameterVersionPayload payload = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];</code>
     */
    protected $payload = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Identifier. [Output only] The resource name of the ParameterVersion in the
     *           format `projects/&#42;&#47;locations/&#42;&#47;parameters/&#42;&#47;versions/&#42;`.
     *     @type \Google\Protobuf\Timestamp $create_time
     *           Output only. [Output only] Create time stamp
     *     @type \Google\Protobuf\Timestamp $update_time
     *           Output only. [Output only] Update time stamp
     *     @type bool $disabled
     *           Optional. Disabled boolean to determine if a ParameterVersion acts as a
     *           metadata only resource (payload is never returned if disabled is true). If
     *           true any calls will always default to BASIC view even if the user
     *           explicitly passes FULL view as part of the request. A render call on a
     *           disabled resource fails with an error. Default value is False.
     *     @type \Google\Cloud\ParameterManager\V1\ParameterVersionPayload $payload
     *           Required. Immutable. Payload content of a ParameterVersion resource.  This
     *           is only returned when the request provides the View value of FULL (default
     *           for GET request).
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Parametermanager\V1\Service::initOnce();
        parent::__construct($data);
    }

    /**
     * Identifier. [Output only] The resource name of the ParameterVersion in the
     * format `projects/&#42;&#47;locations/&#42;&#47;parameters/&#42;&#47;versions/&#42;`.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Identifier. [Output only] The resource name of the ParameterVersion in the
     * format `projects/&#42;&#47;locations/&#42;&#47;parameters/&#42;&#47;versions/&#42;`.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Output only. [Output only] Create time stamp
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getCreateTime()
    {
        return $this->create_time;
    }

    public function hasCreateTime()
    {
        return isset($this->create_time);
    }

    public function clearCreateTime()
    {
        unset($this->create_time);
    }

    /**
     * Output only. [Output only] Create time stamp
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setCreateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->create_time = $var;

        return $this;
    }

    /**
     * Output only. [Output only] Update time stamp
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getUpdateTime()
    {
        return $this->update_time;
    }

    public function hasUpdateTime()
    {
        return isset($this->update_time);
    }

    public function clearUpdateTime()
    {
        unset($this->update_time);
    }

    /**
     * Output only. [Output only] Update time stamp
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setUpdateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->update_time = $var;

        return $this;
    }

    /**
     * Optional. Disabled boolean to determine if a ParameterVersion acts as a
     * metadata only resource (payload is never returned if disabled is true). If
     * true any calls will always default to BASIC view even if the user
     * explicitly passes FULL view as part of the request. A render call on a
     * disabled resource fails with an error. Default value is False.
     *
     * Generated from protobuf field <code>bool disabled = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return bool
     */
    public function getDisabled()
    {
        return $this->disabled;
    }

    /**
     * Optional. Disabled boolean to determine if a ParameterVersion acts as a
     * metadata only resource (payload is never returned if disabled is true). If
     * true any calls will always default to BASIC view even if the user
     * explicitly passes FULL view as part of the request. A render call on a
     * disabled resource fails with an error. Default value is False.
     *
     * Generated from protobuf field <code>bool disabled = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param bool $var
     * @return $this
     */
    public function setDisabled($var)
    {
        GPBUtil::checkBool($var);
        $this->disabled = $var;

        return $this;
    }

    /**
     * Required. Immutable. Payload content of a ParameterVersion resource.  This
     * is only returned when the request provides the View value of FULL (default
     * for GET request).
     *
     * Generated from protobuf field <code>.google.cloud.parametermanager.v1.ParameterVersionPayload payload = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];</code>
     * @return \Google\Cloud\ParameterManager\V1\ParameterVersionPayload|null
     */
    public function getPayload()
    {
        return $this->payload;
    }

    public function hasPayload()
    {
        return isset($this->payload);
    }

    public function clearPayload()
    {
        unset($this->payload);
    }

    /**
     * Required. Immutable. Payload content of a ParameterVersion resource.  This
     * is only returned when the request provides the View value of FULL (default
     * for GET request).
     *
     * Generated from protobuf field <code>.google.cloud.parametermanager.v1.ParameterVersionPayload payload = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];</code>
     * @param \Google\Cloud\ParameterManager\V1\ParameterVersionPayload $var
     * @return $this
     */
    public function setPayload($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\ParameterManager\V1\ParameterVersionPayload::class);
        $this->payload = $var;

        return $this;
    }

}

