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

namespace Google\Cloud\ApiHub\V1;

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

/**
 * The
 * [CreateHostProjectRegistration][google.cloud.apihub.v1.HostProjectRegistrationService.CreateHostProjectRegistration]
 * method's request.
 *
 * Generated from protobuf message <code>google.cloud.apihub.v1.CreateHostProjectRegistrationRequest</code>
 */
class CreateHostProjectRegistrationRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The parent resource for the host project.
     * Format: `projects/{project}/locations/{location}`
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $parent = '';
    /**
     * Required. The ID to use for the Host Project Registration, which will
     * become the final component of the host project registration's resource
     * name. The ID must be the same as the Google cloud project specified in the
     * host_project_registration.gcp_project field.
     *
     * Generated from protobuf field <code>string host_project_registration_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $host_project_registration_id = '';
    /**
     * Required. The host project registration to register.
     *
     * Generated from protobuf field <code>.google.cloud.apihub.v1.HostProjectRegistration host_project_registration = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $host_project_registration = null;

    /**
     * @param string                                          $parent                    Required. The parent resource for the host project.
     *                                                                                   Format: `projects/{project}/locations/{location}`
     *                                                                                   Please see {@see HostProjectRegistrationServiceClient::locationName()} for help formatting this field.
     * @param \Google\Cloud\ApiHub\V1\HostProjectRegistration $hostProjectRegistration   Required. The host project registration to register.
     * @param string                                          $hostProjectRegistrationId Required. The ID to use for the Host Project Registration, which will
     *                                                                                   become the final component of the host project registration's resource
     *                                                                                   name. The ID must be the same as the Google cloud project specified in the
     *                                                                                   host_project_registration.gcp_project field.
     *
     * @return \Google\Cloud\ApiHub\V1\CreateHostProjectRegistrationRequest
     *
     * @experimental
     */
    public static function build(string $parent, \Google\Cloud\ApiHub\V1\HostProjectRegistration $hostProjectRegistration, string $hostProjectRegistrationId): self
    {
        return (new self())
            ->setParent($parent)
            ->setHostProjectRegistration($hostProjectRegistration)
            ->setHostProjectRegistrationId($hostProjectRegistrationId);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. The parent resource for the host project.
     *           Format: `projects/{project}/locations/{location}`
     *     @type string $host_project_registration_id
     *           Required. The ID to use for the Host Project Registration, which will
     *           become the final component of the host project registration's resource
     *           name. The ID must be the same as the Google cloud project specified in the
     *           host_project_registration.gcp_project field.
     *     @type \Google\Cloud\ApiHub\V1\HostProjectRegistration $host_project_registration
     *           Required. The host project registration to register.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Apihub\V1\HostProjectRegistrationService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The parent resource for the host project.
     * Format: `projects/{project}/locations/{location}`
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getParent()
    {
        return $this->parent;
    }

    /**
     * Required. The parent resource for the host project.
     * Format: `projects/{project}/locations/{location}`
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setParent($var)
    {
        GPBUtil::checkString($var, True);
        $this->parent = $var;

        return $this;
    }

    /**
     * Required. The ID to use for the Host Project Registration, which will
     * become the final component of the host project registration's resource
     * name. The ID must be the same as the Google cloud project specified in the
     * host_project_registration.gcp_project field.
     *
     * Generated from protobuf field <code>string host_project_registration_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getHostProjectRegistrationId()
    {
        return $this->host_project_registration_id;
    }

    /**
     * Required. The ID to use for the Host Project Registration, which will
     * become the final component of the host project registration's resource
     * name. The ID must be the same as the Google cloud project specified in the
     * host_project_registration.gcp_project field.
     *
     * Generated from protobuf field <code>string host_project_registration_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setHostProjectRegistrationId($var)
    {
        GPBUtil::checkString($var, True);
        $this->host_project_registration_id = $var;

        return $this;
    }

    /**
     * Required. The host project registration to register.
     *
     * Generated from protobuf field <code>.google.cloud.apihub.v1.HostProjectRegistration host_project_registration = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\ApiHub\V1\HostProjectRegistration|null
     */
    public function getHostProjectRegistration()
    {
        return $this->host_project_registration;
    }

    public function hasHostProjectRegistration()
    {
        return isset($this->host_project_registration);
    }

    public function clearHostProjectRegistration()
    {
        unset($this->host_project_registration);
    }

    /**
     * Required. The host project registration to register.
     *
     * Generated from protobuf field <code>.google.cloud.apihub.v1.HostProjectRegistration host_project_registration = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\ApiHub\V1\HostProjectRegistration $var
     * @return $this
     */
    public function setHostProjectRegistration($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\ApiHub\V1\HostProjectRegistration::class);
        $this->host_project_registration = $var;

        return $this;
    }

}

