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

namespace Google\Cloud\GkeMultiCloud\V1;

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

/**
 * Configuration related to CloudWatch metrics collection in an AWS
 * Auto Scaling group.
 *
 * @deprecated
 * Generated from protobuf message <code>google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection</code>
 */
class AwsAutoscalingGroupMetricsCollection extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The frequency at which EC2 Auto Scaling sends aggregated data to
     * AWS CloudWatch. The only valid value is "1Minute".
     *
     * Generated from protobuf field <code>string granularity = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $granularity = '';
    /**
     * Optional. The metrics to enable. For a list of valid metrics, see
     * https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_EnableMetricsCollection.html.
     * If you specify Granularity and don't specify any metrics, all metrics are
     * enabled.
     *
     * Generated from protobuf field <code>repeated string metrics = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $metrics;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $granularity
     *           Required. The frequency at which EC2 Auto Scaling sends aggregated data to
     *           AWS CloudWatch. The only valid value is "1Minute".
     *     @type string[] $metrics
     *           Optional. The metrics to enable. For a list of valid metrics, see
     *           https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_EnableMetricsCollection.html.
     *           If you specify Granularity and don't specify any metrics, all metrics are
     *           enabled.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The frequency at which EC2 Auto Scaling sends aggregated data to
     * AWS CloudWatch. The only valid value is "1Minute".
     *
     * Generated from protobuf field <code>string granularity = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getGranularity()
    {
        return $this->granularity;
    }

    /**
     * Required. The frequency at which EC2 Auto Scaling sends aggregated data to
     * AWS CloudWatch. The only valid value is "1Minute".
     *
     * Generated from protobuf field <code>string granularity = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setGranularity($var)
    {
        GPBUtil::checkString($var, True);
        $this->granularity = $var;

        return $this;
    }

    /**
     * Optional. The metrics to enable. For a list of valid metrics, see
     * https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_EnableMetricsCollection.html.
     * If you specify Granularity and don't specify any metrics, all metrics are
     * enabled.
     *
     * Generated from protobuf field <code>repeated string metrics = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return RepeatedField<string>
     */
    public function getMetrics()
    {
        return $this->metrics;
    }

    /**
     * Optional. The metrics to enable. For a list of valid metrics, see
     * https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_EnableMetricsCollection.html.
     * If you specify Granularity and don't specify any metrics, all metrics are
     * enabled.
     *
     * Generated from protobuf field <code>repeated string metrics = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string[] $var
     * @return $this
     */
    public function setMetrics($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->metrics = $arr;

        return $this;
    }

}

