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

namespace Google\Apps\Card\V1\Columns;

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

/**
 * A column.
 * [Google Workspace add-ons and Chat
 * apps](https://developers.google.com/workspace/extend)
 *
 * Generated from protobuf message <code>google.apps.card.v1.Columns.Column</code>
 */
class Column extends \Google\Protobuf\Internal\Message
{
    /**
     * Specifies how a column fills the width of the card.
     *
     * Generated from protobuf field <code>.google.apps.card.v1.Columns.Column.HorizontalSizeStyle horizontal_size_style = 1;</code>
     */
    protected $horizontal_size_style = 0;
    /**
     * Specifies whether widgets align to the left, right, or center of a
     * column.
     *
     * Generated from protobuf field <code>.google.apps.card.v1.Widget.HorizontalAlignment horizontal_alignment = 2;</code>
     */
    protected $horizontal_alignment = 0;
    /**
     * Specifies whether widgets align to the top, bottom, or center of a
     * column.
     *
     * Generated from protobuf field <code>.google.apps.card.v1.Columns.Column.VerticalAlignment vertical_alignment = 3;</code>
     */
    protected $vertical_alignment = 0;
    /**
     * An array of widgets included in a column. Widgets appear in the order
     * that they are specified.
     *
     * Generated from protobuf field <code>repeated .google.apps.card.v1.Columns.Column.Widgets widgets = 4;</code>
     */
    private $widgets;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $horizontal_size_style
     *           Specifies how a column fills the width of the card.
     *     @type int $horizontal_alignment
     *           Specifies whether widgets align to the left, right, or center of a
     *           column.
     *     @type int $vertical_alignment
     *           Specifies whether widgets align to the top, bottom, or center of a
     *           column.
     *     @type \Google\Apps\Card\V1\Columns\Column\Widgets[] $widgets
     *           An array of widgets included in a column. Widgets appear in the order
     *           that they are specified.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Apps\Card\V1\Card::initOnce();
        parent::__construct($data);
    }

    /**
     * Specifies how a column fills the width of the card.
     *
     * Generated from protobuf field <code>.google.apps.card.v1.Columns.Column.HorizontalSizeStyle horizontal_size_style = 1;</code>
     * @return int
     */
    public function getHorizontalSizeStyle()
    {
        return $this->horizontal_size_style;
    }

    /**
     * Specifies how a column fills the width of the card.
     *
     * Generated from protobuf field <code>.google.apps.card.v1.Columns.Column.HorizontalSizeStyle horizontal_size_style = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setHorizontalSizeStyle($var)
    {
        GPBUtil::checkEnum($var, \Google\Apps\Card\V1\Columns\Column\HorizontalSizeStyle::class);
        $this->horizontal_size_style = $var;

        return $this;
    }

    /**
     * Specifies whether widgets align to the left, right, or center of a
     * column.
     *
     * Generated from protobuf field <code>.google.apps.card.v1.Widget.HorizontalAlignment horizontal_alignment = 2;</code>
     * @return int
     */
    public function getHorizontalAlignment()
    {
        return $this->horizontal_alignment;
    }

    /**
     * Specifies whether widgets align to the left, right, or center of a
     * column.
     *
     * Generated from protobuf field <code>.google.apps.card.v1.Widget.HorizontalAlignment horizontal_alignment = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setHorizontalAlignment($var)
    {
        GPBUtil::checkEnum($var, \Google\Apps\Card\V1\Widget\HorizontalAlignment::class);
        $this->horizontal_alignment = $var;

        return $this;
    }

    /**
     * Specifies whether widgets align to the top, bottom, or center of a
     * column.
     *
     * Generated from protobuf field <code>.google.apps.card.v1.Columns.Column.VerticalAlignment vertical_alignment = 3;</code>
     * @return int
     */
    public function getVerticalAlignment()
    {
        return $this->vertical_alignment;
    }

    /**
     * Specifies whether widgets align to the top, bottom, or center of a
     * column.
     *
     * Generated from protobuf field <code>.google.apps.card.v1.Columns.Column.VerticalAlignment vertical_alignment = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setVerticalAlignment($var)
    {
        GPBUtil::checkEnum($var, \Google\Apps\Card\V1\Columns\Column\VerticalAlignment::class);
        $this->vertical_alignment = $var;

        return $this;
    }

    /**
     * An array of widgets included in a column. Widgets appear in the order
     * that they are specified.
     *
     * Generated from protobuf field <code>repeated .google.apps.card.v1.Columns.Column.Widgets widgets = 4;</code>
     * @return RepeatedField<\Google\Apps\Card\V1\Columns\Column\Widgets>
     */
    public function getWidgets()
    {
        return $this->widgets;
    }

    /**
     * An array of widgets included in a column. Widgets appear in the order
     * that they are specified.
     *
     * Generated from protobuf field <code>repeated .google.apps.card.v1.Columns.Column.Widgets widgets = 4;</code>
     * @param \Google\Apps\Card\V1\Columns\Column\Widgets[] $var
     * @return $this
     */
    public function setWidgets($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Card\V1\Columns\Column\Widgets::class);
        $this->widgets = $arr;

        return $this;
    }

}

