<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/analytics/admin/v1alpha/resources.proto

namespace Google\Analytics\Admin\V1alpha;

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

/**
 * A virtual resource representing an overview of an account and
 * all its child GA4 properties.
 *
 * Generated from protobuf message <code>google.analytics.admin.v1alpha.AccountSummary</code>
 */
class AccountSummary extends \Google\Protobuf\Internal\Message
{
    /**
     * Resource name for this account summary.
     * Format: accountSummaries/{account_id}
     * Example: "accountSummaries/1000"
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    private $name = '';
    /**
     * Resource name of account referred to by this account summary
     * Format: accounts/{account_id}
     * Example: "accounts/1000"
     *
     * Generated from protobuf field <code>string account = 2 [(.google.api.resource_reference) = {</code>
     */
    private $account = '';
    /**
     * Display name for the account referred to in this account summary.
     *
     * Generated from protobuf field <code>string display_name = 3;</code>
     */
    private $display_name = '';
    /**
     * List of summaries for child accounts of this account.
     *
     * Generated from protobuf field <code>repeated .google.analytics.admin.v1alpha.PropertySummary property_summaries = 4;</code>
     */
    private $property_summaries;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Resource name for this account summary.
     *           Format: accountSummaries/{account_id}
     *           Example: "accountSummaries/1000"
     *     @type string $account
     *           Resource name of account referred to by this account summary
     *           Format: accounts/{account_id}
     *           Example: "accounts/1000"
     *     @type string $display_name
     *           Display name for the account referred to in this account summary.
     *     @type array<\Google\Analytics\Admin\V1alpha\PropertySummary>|\Google\Protobuf\Internal\RepeatedField $property_summaries
     *           List of summaries for child accounts of this account.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Analytics\Admin\V1Alpha\Resources::initOnce();
        parent::__construct($data);
    }

    /**
     * Resource name for this account summary.
     * Format: accountSummaries/{account_id}
     * Example: "accountSummaries/1000"
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Resource name for this account summary.
     * Format: accountSummaries/{account_id}
     * Example: "accountSummaries/1000"
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Resource name of account referred to by this account summary
     * Format: accounts/{account_id}
     * Example: "accounts/1000"
     *
     * Generated from protobuf field <code>string account = 2 [(.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getAccount()
    {
        return $this->account;
    }

    /**
     * Resource name of account referred to by this account summary
     * Format: accounts/{account_id}
     * Example: "accounts/1000"
     *
     * Generated from protobuf field <code>string account = 2 [(.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setAccount($var)
    {
        GPBUtil::checkString($var, True);
        $this->account = $var;

        return $this;
    }

    /**
     * Display name for the account referred to in this account summary.
     *
     * Generated from protobuf field <code>string display_name = 3;</code>
     * @return string
     */
    public function getDisplayName()
    {
        return $this->display_name;
    }

    /**
     * Display name for the account referred to in this account summary.
     *
     * Generated from protobuf field <code>string display_name = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setDisplayName($var)
    {
        GPBUtil::checkString($var, True);
        $this->display_name = $var;

        return $this;
    }

    /**
     * List of summaries for child accounts of this account.
     *
     * Generated from protobuf field <code>repeated .google.analytics.admin.v1alpha.PropertySummary property_summaries = 4;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getPropertySummaries()
    {
        return $this->property_summaries;
    }

    /**
     * List of summaries for child accounts of this account.
     *
     * Generated from protobuf field <code>repeated .google.analytics.admin.v1alpha.PropertySummary property_summaries = 4;</code>
     * @param array<\Google\Analytics\Admin\V1alpha\PropertySummary>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setPropertySummaries($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Admin\V1alpha\PropertySummary::class);
        $this->property_summaries = $arr;

        return $this;
    }

}

