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

namespace Google\Cloud\ApiHub\V1;

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

/**
 * Runtime project attachment represents an attachment from the runtime project
 * to the host project. Api Hub looks for deployments in the attached runtime
 * projects and creates corresponding resources in Api Hub for the discovered
 * deployments.
 *
 * Generated from protobuf message <code>google.cloud.apihub.v1.RuntimeProjectAttachment</code>
 */
class RuntimeProjectAttachment extends \Google\Protobuf\Internal\Message
{
    /**
     * Identifier. The resource name of a runtime project attachment. Format:
     * "projects/{project}/locations/{location}/runtimeProjectAttachments/{runtime_project_attachment}".
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     */
    protected $name = '';
    /**
     * Required. Immutable. Google cloud project name in the format:
     * "projects/abc" or "projects/123". As input, project name with either
     * project id or number are accepted. As output, this field will contain
     * project number.
     *
     * Generated from protobuf field <code>string runtime_project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = {</code>
     */
    protected $runtime_project = '';
    /**
     * Output only. Create time.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $create_time = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Identifier. The resource name of a runtime project attachment. Format:
     *           "projects/{project}/locations/{location}/runtimeProjectAttachments/{runtime_project_attachment}".
     *     @type string $runtime_project
     *           Required. Immutable. Google cloud project name in the format:
     *           "projects/abc" or "projects/123". As input, project name with either
     *           project id or number are accepted. As output, this field will contain
     *           project number.
     *     @type \Google\Protobuf\Timestamp $create_time
     *           Output only. Create time.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Apihub\V1\RuntimeProjectAttachmentService::initOnce();
        parent::__construct($data);
    }

    /**
     * Identifier. The resource name of a runtime project attachment. Format:
     * "projects/{project}/locations/{location}/runtimeProjectAttachments/{runtime_project_attachment}".
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Identifier. The resource name of a runtime project attachment. Format:
     * "projects/{project}/locations/{location}/runtimeProjectAttachments/{runtime_project_attachment}".
     *
     * 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;
    }

    /**
     * Required. Immutable. Google cloud project name in the format:
     * "projects/abc" or "projects/123". As input, project name with either
     * project id or number are accepted. As output, this field will contain
     * project number.
     *
     * Generated from protobuf field <code>string runtime_project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getRuntimeProject()
    {
        return $this->runtime_project;
    }

    /**
     * Required. Immutable. Google cloud project name in the format:
     * "projects/abc" or "projects/123". As input, project name with either
     * project id or number are accepted. As output, this field will contain
     * project number.
     *
     * Generated from protobuf field <code>string runtime_project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setRuntimeProject($var)
    {
        GPBUtil::checkString($var, True);
        $this->runtime_project = $var;

        return $this;
    }

    /**
     * Output only. Create time.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 3 [(.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. Create time.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 3 [(.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;
    }

}

