<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/bigtable/admin/v2/bigtable_table_admin.proto

namespace Google\Cloud\Bigtable\Admin\V2;

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

/**
 * A create, update, or delete of a particular column family.
 *
 * Generated from protobuf message <code>google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification</code>
 */
class ModifyColumnFamiliesRequest_Modification extends \Google\Protobuf\Internal\Message
{
    /**
     * The ID of the column family to be modified.
     *
     * Generated from protobuf field <code>string id = 1;</code>
     */
    private $id = '';
    protected $mod;

    public function __construct() {
        \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce();
        parent::__construct();
    }

    /**
     * The ID of the column family to be modified.
     *
     * Generated from protobuf field <code>string id = 1;</code>
     * @return string
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * The ID of the column family to be modified.
     *
     * Generated from protobuf field <code>string id = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setId($var)
    {
        GPBUtil::checkString($var, True);
        $this->id = $var;

        return $this;
    }

    /**
     * Create a new column family with the specified schema, or fail if
     * one already exists with the given ID.
     *
     * Generated from protobuf field <code>.google.bigtable.admin.v2.ColumnFamily create = 2;</code>
     * @return \Google\Cloud\Bigtable\Admin\V2\ColumnFamily
     */
    public function getCreate()
    {
        return $this->readOneof(2);
    }

    /**
     * Create a new column family with the specified schema, or fail if
     * one already exists with the given ID.
     *
     * Generated from protobuf field <code>.google.bigtable.admin.v2.ColumnFamily create = 2;</code>
     * @param \Google\Cloud\Bigtable\Admin\V2\ColumnFamily $var
     * @return $this
     */
    public function setCreate($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\ColumnFamily::class);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * Update an existing column family to the specified schema, or fail
     * if no column family exists with the given ID.
     *
     * Generated from protobuf field <code>.google.bigtable.admin.v2.ColumnFamily update = 3;</code>
     * @return \Google\Cloud\Bigtable\Admin\V2\ColumnFamily
     */
    public function getUpdate()
    {
        return $this->readOneof(3);
    }

    /**
     * Update an existing column family to the specified schema, or fail
     * if no column family exists with the given ID.
     *
     * Generated from protobuf field <code>.google.bigtable.admin.v2.ColumnFamily update = 3;</code>
     * @param \Google\Cloud\Bigtable\Admin\V2\ColumnFamily $var
     * @return $this
     */
    public function setUpdate($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\ColumnFamily::class);
        $this->writeOneof(3, $var);

        return $this;
    }

    /**
     * Drop (delete) the column family with the given ID, or fail if no such
     * family exists.
     *
     * Generated from protobuf field <code>bool drop = 4;</code>
     * @return bool
     */
    public function getDrop()
    {
        return $this->readOneof(4);
    }

    /**
     * Drop (delete) the column family with the given ID, or fail if no such
     * family exists.
     *
     * Generated from protobuf field <code>bool drop = 4;</code>
     * @param bool $var
     * @return $this
     */
    public function setDrop($var)
    {
        GPBUtil::checkBool($var);
        $this->writeOneof(4, $var);

        return $this;
    }

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

}

