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

namespace Google\Cloud\CertificateManager\V1;

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

/**
 * Request for the `CreateCertificateMap` method.
 *
 * Generated from protobuf message <code>google.cloud.certificatemanager.v1.CreateCertificateMapRequest</code>
 */
class CreateCertificateMapRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The parent resource of the certificate map. Must be in the format
     * `projects/&#42;&#47;locations/&#42;`.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    private $parent = '';
    /**
     * Required. A user-provided name of the certificate map.
     *
     * Generated from protobuf field <code>string certificate_map_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $certificate_map_id = '';
    /**
     * Required. A definition of the certificate map to create.
     *
     * Generated from protobuf field <code>.google.cloud.certificatemanager.v1.CertificateMap certificate_map = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $certificate_map = null;

    /**
     * @param string                                             $parent           Required. The parent resource of the certificate map. Must be in the format
     *                                                                             `projects/&#42;/locations/*`. Please see
     *                                                                             {@see CertificateManagerClient::locationName()} for help formatting this field.
     * @param \Google\Cloud\CertificateManager\V1\CertificateMap $certificateMap   Required. A definition of the certificate map to create.
     * @param string                                             $certificateMapId Required. A user-provided name of the certificate map.
     *
     * @return \Google\Cloud\CertificateManager\V1\CreateCertificateMapRequest
     *
     * @experimental
     */
    public static function build(string $parent, \Google\Cloud\CertificateManager\V1\CertificateMap $certificateMap, string $certificateMapId): self
    {
        return (new self())
            ->setParent($parent)
            ->setCertificateMap($certificateMap)
            ->setCertificateMapId($certificateMapId);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. The parent resource of the certificate map. Must be in the format
     *           `projects/&#42;&#47;locations/&#42;`.
     *     @type string $certificate_map_id
     *           Required. A user-provided name of the certificate map.
     *     @type \Google\Cloud\CertificateManager\V1\CertificateMap $certificate_map
     *           Required. A definition of the certificate map to create.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The parent resource of the certificate map. Must be in the format
     * `projects/&#42;&#47;locations/&#42;`.
     *
     * 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 of the certificate map. Must be in the format
     * `projects/&#42;&#47;locations/&#42;`.
     *
     * 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. A user-provided name of the certificate map.
     *
     * Generated from protobuf field <code>string certificate_map_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getCertificateMapId()
    {
        return $this->certificate_map_id;
    }

    /**
     * Required. A user-provided name of the certificate map.
     *
     * Generated from protobuf field <code>string certificate_map_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setCertificateMapId($var)
    {
        GPBUtil::checkString($var, True);
        $this->certificate_map_id = $var;

        return $this;
    }

    /**
     * Required. A definition of the certificate map to create.
     *
     * Generated from protobuf field <code>.google.cloud.certificatemanager.v1.CertificateMap certificate_map = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\CertificateManager\V1\CertificateMap|null
     */
    public function getCertificateMap()
    {
        return $this->certificate_map;
    }

    public function hasCertificateMap()
    {
        return isset($this->certificate_map);
    }

    public function clearCertificateMap()
    {
        unset($this->certificate_map);
    }

    /**
     * Required. A definition of the certificate map to create.
     *
     * Generated from protobuf field <code>.google.cloud.certificatemanager.v1.CertificateMap certificate_map = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\CertificateManager\V1\CertificateMap $var
     * @return $this
     */
    public function setCertificateMap($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\CertificateManager\V1\CertificateMap::class);
        $this->certificate_map = $var;

        return $this;
    }

}

