<?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 `CreateCertificate` method.
 *
 * Generated from protobuf message <code>google.cloud.certificatemanager.v1.CreateCertificateRequest</code>
 */
class CreateCertificateRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The parent resource of the certificate. 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.
     *
     * Generated from protobuf field <code>string certificate_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $certificate_id = '';
    /**
     * Required. A definition of the certificate to create.
     *
     * Generated from protobuf field <code>.google.cloud.certificatemanager.v1.Certificate certificate = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $certificate = null;

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

    /**
     * Required. The parent resource of the certificate. 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. 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.
     *
     * Generated from protobuf field <code>string certificate_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getCertificateId()
    {
        return $this->certificate_id;
    }

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

        return $this;
    }

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

    public function hasCertificate()
    {
        return isset($this->certificate);
    }

    public function clearCertificate()
    {
        unset($this->certificate);
    }

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

        return $this;
    }

}

