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

namespace Google\Cloud\Video\Transcoder\V1\Overlay;

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

/**
 * Display static overlay object.
 *
 * Generated from protobuf message <code>google.cloud.video.transcoder.v1.Overlay.AnimationStatic</code>
 */
class AnimationStatic extends \Google\Protobuf\Internal\Message
{
    /**
     * Normalized coordinates based on output video resolution. Valid
     * values: `0.0`–`1.0`. `xy` is the upper-left coordinate of the overlay
     * object. For example, use the x and y coordinates {0,0} to position the
     * top-left corner of the overlay animation in the top-left corner of the
     * output video.
     *
     * Generated from protobuf field <code>.google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate xy = 1;</code>
     */
    private $xy = null;
    /**
     * The time to start displaying the overlay object, in seconds. Default: 0
     *
     * Generated from protobuf field <code>.google.protobuf.Duration start_time_offset = 2;</code>
     */
    private $start_time_offset = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate $xy
     *           Normalized coordinates based on output video resolution. Valid
     *           values: `0.0`–`1.0`. `xy` is the upper-left coordinate of the overlay
     *           object. For example, use the x and y coordinates {0,0} to position the
     *           top-left corner of the overlay animation in the top-left corner of the
     *           output video.
     *     @type \Google\Protobuf\Duration $start_time_offset
     *           The time to start displaying the overlay object, in seconds. Default: 0
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce();
        parent::__construct($data);
    }

    /**
     * Normalized coordinates based on output video resolution. Valid
     * values: `0.0`–`1.0`. `xy` is the upper-left coordinate of the overlay
     * object. For example, use the x and y coordinates {0,0} to position the
     * top-left corner of the overlay animation in the top-left corner of the
     * output video.
     *
     * Generated from protobuf field <code>.google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate xy = 1;</code>
     * @return \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate|null
     */
    public function getXy()
    {
        return $this->xy;
    }

    public function hasXy()
    {
        return isset($this->xy);
    }

    public function clearXy()
    {
        unset($this->xy);
    }

    /**
     * Normalized coordinates based on output video resolution. Valid
     * values: `0.0`–`1.0`. `xy` is the upper-left coordinate of the overlay
     * object. For example, use the x and y coordinates {0,0} to position the
     * top-left corner of the overlay animation in the top-left corner of the
     * output video.
     *
     * Generated from protobuf field <code>.google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate xy = 1;</code>
     * @param \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate $var
     * @return $this
     */
    public function setXy($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate::class);
        $this->xy = $var;

        return $this;
    }

    /**
     * The time to start displaying the overlay object, in seconds. Default: 0
     *
     * Generated from protobuf field <code>.google.protobuf.Duration start_time_offset = 2;</code>
     * @return \Google\Protobuf\Duration|null
     */
    public function getStartTimeOffset()
    {
        return $this->start_time_offset;
    }

    public function hasStartTimeOffset()
    {
        return isset($this->start_time_offset);
    }

    public function clearStartTimeOffset()
    {
        unset($this->start_time_offset);
    }

    /**
     * The time to start displaying the overlay object, in seconds. Default: 0
     *
     * Generated from protobuf field <code>.google.protobuf.Duration start_time_offset = 2;</code>
     * @param \Google\Protobuf\Duration $var
     * @return $this
     */
    public function setStartTimeOffset($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
        $this->start_time_offset = $var;

        return $this;
    }

}


