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

namespace Google\Cloud\AIPlatform\V1\SlackSource;

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

/**
 * SlackChannels contains the Slack channels and corresponding access token.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.SlackSource.SlackChannels</code>
 */
class SlackChannels extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The Slack channel IDs.
     *
     * Generated from protobuf field <code>repeated .google.cloud.aiplatform.v1.SlackSource.SlackChannels.SlackChannel channels = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $channels;
    /**
     * Required. The SecretManager secret version resource name (e.g.
     * projects/{project}/secrets/{secret}/versions/{version}) storing the
     * Slack channel access token that has access to the slack channel IDs.
     * See: https://api.slack.com/tutorials/tracks/getting-a-token.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.ApiAuth.ApiKeyConfig api_key_config = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $api_key_config = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\AIPlatform\V1\SlackSource\SlackChannels\SlackChannel>|\Google\Protobuf\Internal\RepeatedField $channels
     *           Required. The Slack channel IDs.
     *     @type \Google\Cloud\AIPlatform\V1\ApiAuth\ApiKeyConfig $api_key_config
     *           Required. The SecretManager secret version resource name (e.g.
     *           projects/{project}/secrets/{secret}/versions/{version}) storing the
     *           Slack channel access token that has access to the slack channel IDs.
     *           See: https://api.slack.com/tutorials/tracks/getting-a-token.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\Io::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The Slack channel IDs.
     *
     * Generated from protobuf field <code>repeated .google.cloud.aiplatform.v1.SlackSource.SlackChannels.SlackChannel channels = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getChannels()
    {
        return $this->channels;
    }

    /**
     * Required. The Slack channel IDs.
     *
     * Generated from protobuf field <code>repeated .google.cloud.aiplatform.v1.SlackSource.SlackChannels.SlackChannel channels = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param array<\Google\Cloud\AIPlatform\V1\SlackSource\SlackChannels\SlackChannel>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setChannels($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\SlackSource\SlackChannels\SlackChannel::class);
        $this->channels = $arr;

        return $this;
    }

    /**
     * Required. The SecretManager secret version resource name (e.g.
     * projects/{project}/secrets/{secret}/versions/{version}) storing the
     * Slack channel access token that has access to the slack channel IDs.
     * See: https://api.slack.com/tutorials/tracks/getting-a-token.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.ApiAuth.ApiKeyConfig api_key_config = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\AIPlatform\V1\ApiAuth\ApiKeyConfig|null
     */
    public function getApiKeyConfig()
    {
        return $this->api_key_config;
    }

    public function hasApiKeyConfig()
    {
        return isset($this->api_key_config);
    }

    public function clearApiKeyConfig()
    {
        unset($this->api_key_config);
    }

    /**
     * Required. The SecretManager secret version resource name (e.g.
     * projects/{project}/secrets/{secret}/versions/{version}) storing the
     * Slack channel access token that has access to the slack channel IDs.
     * See: https://api.slack.com/tutorials/tracks/getting-a-token.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.ApiAuth.ApiKeyConfig api_key_config = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\AIPlatform\V1\ApiAuth\ApiKeyConfig $var
     * @return $this
     */
    public function setApiKeyConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\ApiAuth\ApiKeyConfig::class);
        $this->api_key_config = $var;

        return $this;
    }

}


