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

namespace Google\Cloud\Dataplex\V1\DataProfileResult\Profile;

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

/**
 * Represents a column field within a table schema.
 *
 * Generated from protobuf message <code>google.cloud.dataplex.v1.DataProfileResult.Profile.Field</code>
 */
class Field extends \Google\Protobuf\Internal\Message
{
    /**
     * The name of the field.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    private $name = '';
    /**
     * The field data type. Possible values include:
     * * STRING
     * * BYTE
     * * INT64
     * * INT32
     * * INT16
     * * DOUBLE
     * * FLOAT
     * * DECIMAL
     * * BOOLEAN
     * * BINARY
     * * TIMESTAMP
     * * DATE
     * * TIME
     * * NULL
     * * RECORD
     *
     * Generated from protobuf field <code>string type = 2;</code>
     */
    private $type = '';
    /**
     * The mode of the field. Its value will be:
     * REQUIRED, if it is a required field.
     * NULLABLE, if it is an optional field.
     * REPEATED, if it is a repeated field.
     *
     * Generated from protobuf field <code>string mode = 3;</code>
     */
    private $mode = '';
    /**
     * The profile information for the corresponding field.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo profile = 4;</code>
     */
    private $profile = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           The name of the field.
     *     @type string $type
     *           The field data type. Possible values include:
     *           * STRING
     *           * BYTE
     *           * INT64
     *           * INT32
     *           * INT16
     *           * DOUBLE
     *           * FLOAT
     *           * DECIMAL
     *           * BOOLEAN
     *           * BINARY
     *           * TIMESTAMP
     *           * DATE
     *           * TIME
     *           * NULL
     *           * RECORD
     *     @type string $mode
     *           The mode of the field. Its value will be:
     *           REQUIRED, if it is a required field.
     *           NULLABLE, if it is an optional field.
     *           REPEATED, if it is a repeated field.
     *     @type \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo $profile
     *           The profile information for the corresponding field.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dataplex\V1\DataProfile::initOnce();
        parent::__construct($data);
    }

    /**
     * The name of the field.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

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

        return $this;
    }

    /**
     * The field data type. Possible values include:
     * * STRING
     * * BYTE
     * * INT64
     * * INT32
     * * INT16
     * * DOUBLE
     * * FLOAT
     * * DECIMAL
     * * BOOLEAN
     * * BINARY
     * * TIMESTAMP
     * * DATE
     * * TIME
     * * NULL
     * * RECORD
     *
     * Generated from protobuf field <code>string type = 2;</code>
     * @return string
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * The field data type. Possible values include:
     * * STRING
     * * BYTE
     * * INT64
     * * INT32
     * * INT16
     * * DOUBLE
     * * FLOAT
     * * DECIMAL
     * * BOOLEAN
     * * BINARY
     * * TIMESTAMP
     * * DATE
     * * TIME
     * * NULL
     * * RECORD
     *
     * Generated from protobuf field <code>string type = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkString($var, True);
        $this->type = $var;

        return $this;
    }

    /**
     * The mode of the field. Its value will be:
     * REQUIRED, if it is a required field.
     * NULLABLE, if it is an optional field.
     * REPEATED, if it is a repeated field.
     *
     * Generated from protobuf field <code>string mode = 3;</code>
     * @return string
     */
    public function getMode()
    {
        return $this->mode;
    }

    /**
     * The mode of the field. Its value will be:
     * REQUIRED, if it is a required field.
     * NULLABLE, if it is an optional field.
     * REPEATED, if it is a repeated field.
     *
     * Generated from protobuf field <code>string mode = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setMode($var)
    {
        GPBUtil::checkString($var, True);
        $this->mode = $var;

        return $this;
    }

    /**
     * The profile information for the corresponding field.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo profile = 4;</code>
     * @return \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo|null
     */
    public function getProfile()
    {
        return $this->profile;
    }

    public function hasProfile()
    {
        return isset($this->profile);
    }

    public function clearProfile()
    {
        unset($this->profile);
    }

    /**
     * The profile information for the corresponding field.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo profile = 4;</code>
     * @param \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo $var
     * @return $this
     */
    public function setProfile($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo::class);
        $this->profile = $var;

        return $this;
    }

}


