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

namespace Google\Apps\Card\V1;

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

/**
 * Represents an image.
 * [Google Workspace Add-ons and Chat
 * apps](https://developers.google.com/workspace/extend):
 *
 * Generated from protobuf message <code>google.apps.card.v1.ImageComponent</code>
 */
class ImageComponent extends \Google\Protobuf\Internal\Message
{
    /**
     * The image URL.
     *
     * Generated from protobuf field <code>string image_uri = 1;</code>
     */
    protected $image_uri = '';
    /**
     * The accessibility label for the image.
     *
     * Generated from protobuf field <code>string alt_text = 2;</code>
     */
    protected $alt_text = '';
    /**
     * The crop style to apply to the image.
     *
     * Generated from protobuf field <code>.google.apps.card.v1.ImageCropStyle crop_style = 3;</code>
     */
    protected $crop_style = null;
    /**
     * The border style to apply to the image.
     *
     * Generated from protobuf field <code>.google.apps.card.v1.BorderStyle border_style = 4;</code>
     */
    protected $border_style = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $image_uri
     *           The image URL.
     *     @type string $alt_text
     *           The accessibility label for the image.
     *     @type \Google\Apps\Card\V1\ImageCropStyle $crop_style
     *           The crop style to apply to the image.
     *     @type \Google\Apps\Card\V1\BorderStyle $border_style
     *           The border style to apply to the image.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Apps\Card\V1\Card::initOnce();
        parent::__construct($data);
    }

    /**
     * The image URL.
     *
     * Generated from protobuf field <code>string image_uri = 1;</code>
     * @return string
     */
    public function getImageUri()
    {
        return $this->image_uri;
    }

    /**
     * The image URL.
     *
     * Generated from protobuf field <code>string image_uri = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setImageUri($var)
    {
        GPBUtil::checkString($var, True);
        $this->image_uri = $var;

        return $this;
    }

    /**
     * The accessibility label for the image.
     *
     * Generated from protobuf field <code>string alt_text = 2;</code>
     * @return string
     */
    public function getAltText()
    {
        return $this->alt_text;
    }

    /**
     * The accessibility label for the image.
     *
     * Generated from protobuf field <code>string alt_text = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setAltText($var)
    {
        GPBUtil::checkString($var, True);
        $this->alt_text = $var;

        return $this;
    }

    /**
     * The crop style to apply to the image.
     *
     * Generated from protobuf field <code>.google.apps.card.v1.ImageCropStyle crop_style = 3;</code>
     * @return \Google\Apps\Card\V1\ImageCropStyle|null
     */
    public function getCropStyle()
    {
        return $this->crop_style;
    }

    public function hasCropStyle()
    {
        return isset($this->crop_style);
    }

    public function clearCropStyle()
    {
        unset($this->crop_style);
    }

    /**
     * The crop style to apply to the image.
     *
     * Generated from protobuf field <code>.google.apps.card.v1.ImageCropStyle crop_style = 3;</code>
     * @param \Google\Apps\Card\V1\ImageCropStyle $var
     * @return $this
     */
    public function setCropStyle($var)
    {
        GPBUtil::checkMessage($var, \Google\Apps\Card\V1\ImageCropStyle::class);
        $this->crop_style = $var;

        return $this;
    }

    /**
     * The border style to apply to the image.
     *
     * Generated from protobuf field <code>.google.apps.card.v1.BorderStyle border_style = 4;</code>
     * @return \Google\Apps\Card\V1\BorderStyle|null
     */
    public function getBorderStyle()
    {
        return $this->border_style;
    }

    public function hasBorderStyle()
    {
        return isset($this->border_style);
    }

    public function clearBorderStyle()
    {
        unset($this->border_style);
    }

    /**
     * The border style to apply to the image.
     *
     * Generated from protobuf field <code>.google.apps.card.v1.BorderStyle border_style = 4;</code>
     * @param \Google\Apps\Card\V1\BorderStyle $var
     * @return $this
     */
    public function setBorderStyle($var)
    {
        GPBUtil::checkMessage($var, \Google\Apps\Card\V1\BorderStyle::class);
        $this->border_style = $var;

        return $this;
    }

}

