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

namespace Google\Cloud\Audit\BigQueryAuditMetadata;

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

/**
 * User Defined Function (UDF) or Stored Procedure.
 *
 * Generated from protobuf message <code>google.cloud.audit.BigQueryAuditMetadata.Routine</code>
 */
class Routine extends \Google\Protobuf\Internal\Message
{
    /**
     * Routine URI.
     * Format:
     * `projects/<project_id>/datasets/<dataset_id>/routines/<routine_id>`.
     *
     * Generated from protobuf field <code>string routine_name = 1;</code>
     */
    protected $routine_name = '';
    /**
     * Routine creation time.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 5;</code>
     */
    protected $create_time = null;
    /**
     * Routine last update time.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 6;</code>
     */
    protected $update_time = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $routine_name
     *           Routine URI.
     *           Format:
     *           `projects/<project_id>/datasets/<dataset_id>/routines/<routine_id>`.
     *     @type \Google\Protobuf\Timestamp $create_time
     *           Routine creation time.
     *     @type \Google\Protobuf\Timestamp $update_time
     *           Routine last update time.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Audit\BigqueryAuditMetadata::initOnce();
        parent::__construct($data);
    }

    /**
     * Routine URI.
     * Format:
     * `projects/<project_id>/datasets/<dataset_id>/routines/<routine_id>`.
     *
     * Generated from protobuf field <code>string routine_name = 1;</code>
     * @return string
     */
    public function getRoutineName()
    {
        return $this->routine_name;
    }

    /**
     * Routine URI.
     * Format:
     * `projects/<project_id>/datasets/<dataset_id>/routines/<routine_id>`.
     *
     * Generated from protobuf field <code>string routine_name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setRoutineName($var)
    {
        GPBUtil::checkString($var, True);
        $this->routine_name = $var;

        return $this;
    }

    /**
     * Routine creation time.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 5;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getCreateTime()
    {
        return $this->create_time;
    }

    public function hasCreateTime()
    {
        return isset($this->create_time);
    }

    public function clearCreateTime()
    {
        unset($this->create_time);
    }

    /**
     * Routine creation time.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 5;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setCreateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->create_time = $var;

        return $this;
    }

    /**
     * Routine last update time.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 6;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getUpdateTime()
    {
        return $this->update_time;
    }

    public function hasUpdateTime()
    {
        return isset($this->update_time);
    }

    public function clearUpdateTime()
    {
        unset($this->update_time);
    }

    /**
     * Routine last update time.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 6;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setUpdateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->update_time = $var;

        return $this;
    }

}


