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

namespace Google\Cloud\PubSub\V1\IngestionDataSourceSettings;

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

/**
 * Ingestion settings for Amazon Kinesis Data Streams.
 *
 * Generated from protobuf message <code>google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis</code>
 */
class AwsKinesis extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. An output-only field that indicates the state of the Kinesis
     * ingestion source.
     *
     * Generated from protobuf field <code>.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $state = 0;
    /**
     * Required. The Kinesis stream ARN to ingest data from.
     *
     * Generated from protobuf field <code>string stream_arn = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $stream_arn = '';
    /**
     * Required. The Kinesis consumer ARN to used for ingestion in Enhanced
     * Fan-Out mode. The consumer must be already created and ready to be used.
     *
     * Generated from protobuf field <code>string consumer_arn = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $consumer_arn = '';
    /**
     * Required. AWS role ARN to be used for Federated Identity authentication
     * with Kinesis. Check the Pub/Sub docs for how to set up this role and the
     * required permissions that need to be attached to it.
     *
     * Generated from protobuf field <code>string aws_role_arn = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $aws_role_arn = '';
    /**
     * Required. The GCP service account to be used for Federated Identity
     * authentication with Kinesis (via a `AssumeRoleWithWebIdentity` call for
     * the provided role). The `aws_role_arn` must be set up with
     * `accounts.google.com:sub` equals to this service account number.
     *
     * Generated from protobuf field <code>string gcp_service_account = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $gcp_service_account = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $state
     *           Output only. An output-only field that indicates the state of the Kinesis
     *           ingestion source.
     *     @type string $stream_arn
     *           Required. The Kinesis stream ARN to ingest data from.
     *     @type string $consumer_arn
     *           Required. The Kinesis consumer ARN to used for ingestion in Enhanced
     *           Fan-Out mode. The consumer must be already created and ready to be used.
     *     @type string $aws_role_arn
     *           Required. AWS role ARN to be used for Federated Identity authentication
     *           with Kinesis. Check the Pub/Sub docs for how to set up this role and the
     *           required permissions that need to be attached to it.
     *     @type string $gcp_service_account
     *           Required. The GCP service account to be used for Federated Identity
     *           authentication with Kinesis (via a `AssumeRoleWithWebIdentity` call for
     *           the provided role). The `aws_role_arn` must be set up with
     *           `accounts.google.com:sub` equals to this service account number.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. An output-only field that indicates the state of the Kinesis
     * ingestion source.
     *
     * Generated from protobuf field <code>.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getState()
    {
        return $this->state;
    }

    /**
     * Output only. An output-only field that indicates the state of the Kinesis
     * ingestion source.
     *
     * Generated from protobuf field <code>.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setState($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\PubSub\V1\IngestionDataSourceSettings\AwsKinesis\State::class);
        $this->state = $var;

        return $this;
    }

    /**
     * Required. The Kinesis stream ARN to ingest data from.
     *
     * Generated from protobuf field <code>string stream_arn = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getStreamArn()
    {
        return $this->stream_arn;
    }

    /**
     * Required. The Kinesis stream ARN to ingest data from.
     *
     * Generated from protobuf field <code>string stream_arn = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setStreamArn($var)
    {
        GPBUtil::checkString($var, True);
        $this->stream_arn = $var;

        return $this;
    }

    /**
     * Required. The Kinesis consumer ARN to used for ingestion in Enhanced
     * Fan-Out mode. The consumer must be already created and ready to be used.
     *
     * Generated from protobuf field <code>string consumer_arn = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getConsumerArn()
    {
        return $this->consumer_arn;
    }

    /**
     * Required. The Kinesis consumer ARN to used for ingestion in Enhanced
     * Fan-Out mode. The consumer must be already created and ready to be used.
     *
     * Generated from protobuf field <code>string consumer_arn = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setConsumerArn($var)
    {
        GPBUtil::checkString($var, True);
        $this->consumer_arn = $var;

        return $this;
    }

    /**
     * Required. AWS role ARN to be used for Federated Identity authentication
     * with Kinesis. Check the Pub/Sub docs for how to set up this role and the
     * required permissions that need to be attached to it.
     *
     * Generated from protobuf field <code>string aws_role_arn = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getAwsRoleArn()
    {
        return $this->aws_role_arn;
    }

    /**
     * Required. AWS role ARN to be used for Federated Identity authentication
     * with Kinesis. Check the Pub/Sub docs for how to set up this role and the
     * required permissions that need to be attached to it.
     *
     * Generated from protobuf field <code>string aws_role_arn = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setAwsRoleArn($var)
    {
        GPBUtil::checkString($var, True);
        $this->aws_role_arn = $var;

        return $this;
    }

    /**
     * Required. The GCP service account to be used for Federated Identity
     * authentication with Kinesis (via a `AssumeRoleWithWebIdentity` call for
     * the provided role). The `aws_role_arn` must be set up with
     * `accounts.google.com:sub` equals to this service account number.
     *
     * Generated from protobuf field <code>string gcp_service_account = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getGcpServiceAccount()
    {
        return $this->gcp_service_account;
    }

    /**
     * Required. The GCP service account to be used for Federated Identity
     * authentication with Kinesis (via a `AssumeRoleWithWebIdentity` call for
     * the provided role). The `aws_role_arn` must be set up with
     * `accounts.google.com:sub` equals to this service account number.
     *
     * Generated from protobuf field <code>string gcp_service_account = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setGcpServiceAccount($var)
    {
        GPBUtil::checkString($var, True);
        $this->gcp_service_account = $var;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AwsKinesis::class, \Google\Cloud\PubSub\V1\IngestionDataSourceSettings_AwsKinesis::class);

