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

namespace Google\Cloud\ManagedKafka\V1;

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

/**
 * Configuration properties for a Kafka Connect cluster deployed to Google Cloud
 * Platform.
 *
 * Generated from protobuf message <code>google.cloud.managedkafka.v1.ConnectGcpConfig</code>
 */
class ConnectGcpConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Access configuration for the Kafka Connect cluster.
     *
     * Generated from protobuf field <code>.google.cloud.managedkafka.v1.ConnectAccessConfig access_config = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $access_config = null;
    /**
     * Optional. Secrets to load into workers. Exact SecretVersions from Secret
     * Manager must be provided -- aliases are not supported. Up to 32 secrets may
     * be loaded into one cluster. Format:
     * projects/<project-id>/secrets/<secret-name>/versions/<version-id>
     *
     * Generated from protobuf field <code>repeated string secret_paths = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {</code>
     */
    private $secret_paths;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\ManagedKafka\V1\ConnectAccessConfig $access_config
     *           Required. Access configuration for the Kafka Connect cluster.
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $secret_paths
     *           Optional. Secrets to load into workers. Exact SecretVersions from Secret
     *           Manager must be provided -- aliases are not supported. Up to 32 secrets may
     *           be loaded into one cluster. Format:
     *           projects/<project-id>/secrets/<secret-name>/versions/<version-id>
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Managedkafka\V1\Resources::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Access configuration for the Kafka Connect cluster.
     *
     * Generated from protobuf field <code>.google.cloud.managedkafka.v1.ConnectAccessConfig access_config = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\ManagedKafka\V1\ConnectAccessConfig|null
     */
    public function getAccessConfig()
    {
        return $this->access_config;
    }

    public function hasAccessConfig()
    {
        return isset($this->access_config);
    }

    public function clearAccessConfig()
    {
        unset($this->access_config);
    }

    /**
     * Required. Access configuration for the Kafka Connect cluster.
     *
     * Generated from protobuf field <code>.google.cloud.managedkafka.v1.ConnectAccessConfig access_config = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\ManagedKafka\V1\ConnectAccessConfig $var
     * @return $this
     */
    public function setAccessConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\ManagedKafka\V1\ConnectAccessConfig::class);
        $this->access_config = $var;

        return $this;
    }

    /**
     * Optional. Secrets to load into workers. Exact SecretVersions from Secret
     * Manager must be provided -- aliases are not supported. Up to 32 secrets may
     * be loaded into one cluster. Format:
     * projects/<project-id>/secrets/<secret-name>/versions/<version-id>
     *
     * Generated from protobuf field <code>repeated string secret_paths = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getSecretPaths()
    {
        return $this->secret_paths;
    }

    /**
     * Optional. Secrets to load into workers. Exact SecretVersions from Secret
     * Manager must be provided -- aliases are not supported. Up to 32 secrets may
     * be loaded into one cluster. Format:
     * projects/<project-id>/secrets/<secret-name>/versions/<version-id>
     *
     * Generated from protobuf field <code>repeated string secret_paths = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setSecretPaths($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->secret_paths = $arr;

        return $this;
    }

}

