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

namespace Google\Photos\Library\V1;

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

/**
 * A new enrichment item to be added to an album, used by the
 * `albums.addEnrichment` call.
 *
 * Generated from protobuf message <code>google.photos.library.v1.NewEnrichmentItem</code>
 */
class NewEnrichmentItem extends \Google\Protobuf\Internal\Message
{
    protected $enrichment;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Photos\Library\V1\TextEnrichment $text_enrichment
     *           Text to be added to the album.
     *     @type \Google\Photos\Library\V1\LocationEnrichment $location_enrichment
     *           Location to be added to the album.
     *     @type \Google\Photos\Library\V1\MapEnrichment $map_enrichment
     *           Map to be added to the album.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
        parent::__construct($data);
    }

    /**
     * Text to be added to the album.
     *
     * Generated from protobuf field <code>.google.photos.library.v1.TextEnrichment text_enrichment = 1;</code>
     * @return \Google\Photos\Library\V1\TextEnrichment|null
     */
    public function getTextEnrichment()
    {
        return $this->readOneof(1);
    }

    public function hasTextEnrichment()
    {
        return $this->hasOneof(1);
    }

    /**
     * Text to be added to the album.
     *
     * Generated from protobuf field <code>.google.photos.library.v1.TextEnrichment text_enrichment = 1;</code>
     * @param \Google\Photos\Library\V1\TextEnrichment $var
     * @return $this
     */
    public function setTextEnrichment($var)
    {
        GPBUtil::checkMessage($var, \Google\Photos\Library\V1\TextEnrichment::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * Location to be added to the album.
     *
     * Generated from protobuf field <code>.google.photos.library.v1.LocationEnrichment location_enrichment = 2;</code>
     * @return \Google\Photos\Library\V1\LocationEnrichment|null
     */
    public function getLocationEnrichment()
    {
        return $this->readOneof(2);
    }

    public function hasLocationEnrichment()
    {
        return $this->hasOneof(2);
    }

    /**
     * Location to be added to the album.
     *
     * Generated from protobuf field <code>.google.photos.library.v1.LocationEnrichment location_enrichment = 2;</code>
     * @param \Google\Photos\Library\V1\LocationEnrichment $var
     * @return $this
     */
    public function setLocationEnrichment($var)
    {
        GPBUtil::checkMessage($var, \Google\Photos\Library\V1\LocationEnrichment::class);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * Map to be added to the album.
     *
     * Generated from protobuf field <code>.google.photos.library.v1.MapEnrichment map_enrichment = 3;</code>
     * @return \Google\Photos\Library\V1\MapEnrichment|null
     */
    public function getMapEnrichment()
    {
        return $this->readOneof(3);
    }

    public function hasMapEnrichment()
    {
        return $this->hasOneof(3);
    }

    /**
     * Map to be added to the album.
     *
     * Generated from protobuf field <code>.google.photos.library.v1.MapEnrichment map_enrichment = 3;</code>
     * @param \Google\Photos\Library\V1\MapEnrichment $var
     * @return $this
     */
    public function setMapEnrichment($var)
    {
        GPBUtil::checkMessage($var, \Google\Photos\Library\V1\MapEnrichment::class);
        $this->writeOneof(3, $var);

        return $this;
    }

    /**
     * @return string
     */
    public function getEnrichment()
    {
        return $this->whichOneof("enrichment");
    }

}

