<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/dialogflow/v2/tool.proto

namespace Google\Cloud\Dialogflow\V2\Tool\TLSConfig;

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

/**
 * The CA certificate.
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.v2.Tool.TLSConfig.CACert</code>
 */
class CACert extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The name of the allowed custom CA certificates. This
     * can be used to disambiguate the custom CA certificates.
     *
     * Generated from protobuf field <code>string display_name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $display_name = '';
    /**
     * Required. The allowed custom CA certificates (in DER format) for
     * HTTPS verification. This overrides the default SSL trust store. If this
     * is empty or unspecified, Dialogflow will use Google's default trust
     * store to verify certificates. N.B. Make sure the HTTPS server
     * certificates are signed with "subject alt name". For instance a
     * certificate can be self-signed using the following command,
     * ```
     *    openssl x509 -req -days 200 -in example.com.csr \
     *      -signkey example.com.key \
     *      -out example.com.crt \
     *      -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
     * ```
     *
     * Generated from protobuf field <code>bytes cert = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $cert = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $display_name
     *           Required. The name of the allowed custom CA certificates. This
     *           can be used to disambiguate the custom CA certificates.
     *     @type string $cert
     *           Required. The allowed custom CA certificates (in DER format) for
     *           HTTPS verification. This overrides the default SSL trust store. If this
     *           is empty or unspecified, Dialogflow will use Google's default trust
     *           store to verify certificates. N.B. Make sure the HTTPS server
     *           certificates are signed with "subject alt name". For instance a
     *           certificate can be self-signed using the following command,
     *           ```
     *              openssl x509 -req -days 200 -in example.com.csr \
     *                -signkey example.com.key \
     *                -out example.com.crt \
     *                -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
     *           ```
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dialogflow\V2\Tool::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The name of the allowed custom CA certificates. This
     * can be used to disambiguate the custom CA certificates.
     *
     * Generated from protobuf field <code>string display_name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getDisplayName()
    {
        return $this->display_name;
    }

    /**
     * Required. The name of the allowed custom CA certificates. This
     * can be used to disambiguate the custom CA certificates.
     *
     * Generated from protobuf field <code>string display_name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setDisplayName($var)
    {
        GPBUtil::checkString($var, True);
        $this->display_name = $var;

        return $this;
    }

    /**
     * Required. The allowed custom CA certificates (in DER format) for
     * HTTPS verification. This overrides the default SSL trust store. If this
     * is empty or unspecified, Dialogflow will use Google's default trust
     * store to verify certificates. N.B. Make sure the HTTPS server
     * certificates are signed with "subject alt name". For instance a
     * certificate can be self-signed using the following command,
     * ```
     *    openssl x509 -req -days 200 -in example.com.csr \
     *      -signkey example.com.key \
     *      -out example.com.crt \
     *      -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
     * ```
     *
     * Generated from protobuf field <code>bytes cert = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getCert()
    {
        return $this->cert;
    }

    /**
     * Required. The allowed custom CA certificates (in DER format) for
     * HTTPS verification. This overrides the default SSL trust store. If this
     * is empty or unspecified, Dialogflow will use Google's default trust
     * store to verify certificates. N.B. Make sure the HTTPS server
     * certificates are signed with "subject alt name". For instance a
     * certificate can be self-signed using the following command,
     * ```
     *    openssl x509 -req -days 200 -in example.com.csr \
     *      -signkey example.com.key \
     *      -out example.com.crt \
     *      -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
     * ```
     *
     * Generated from protobuf field <code>bytes cert = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setCert($var)
    {
        GPBUtil::checkString($var, False);
        $this->cert = $var;

        return $this;
    }

}

