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

namespace Google\Cloud\Audit;

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

/**
 * Metadata about the request.
 *
 * Generated from protobuf message <code>google.cloud.audit.RequestMetadata</code>
 */
class RequestMetadata extends \Google\Protobuf\Internal\Message
{
    /**
     * The IP address of the caller.
     *
     * Generated from protobuf field <code>string caller_ip = 1;</code>
     */
    private $caller_ip = '';
    /**
     * The user agent of the caller.
     * This information is not authenticated and should be treated accordingly.
     * For example:
     * +   `google-api-python-client/1.4.0`:
     *     The request was made by the Google API client for Python.
     * +   `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`:
     *     The request was made by the Google Cloud SDK CLI (gcloud).
     * +   `AppEngine-Google; (+http://code.google.com/appengine; appid: s~my-project`:
     *     The request was made from the `my-project` App Engine app.
     *
     * Generated from protobuf field <code>string caller_supplied_user_agent = 2;</code>
     */
    private $caller_supplied_user_agent = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $caller_ip
     *           The IP address of the caller.
     *     @type string $caller_supplied_user_agent
     *           The user agent of the caller.
     *           This information is not authenticated and should be treated accordingly.
     *           For example:
     *           +   `google-api-python-client/1.4.0`:
     *               The request was made by the Google API client for Python.
     *           +   `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`:
     *               The request was made by the Google Cloud SDK CLI (gcloud).
     *           +   `AppEngine-Google; (+http://code.google.com/appengine; appid: s~my-project`:
     *               The request was made from the `my-project` App Engine app.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Audit\AuditLog::initOnce();
        parent::__construct($data);
    }

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

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

        return $this;
    }

    /**
     * The user agent of the caller.
     * This information is not authenticated and should be treated accordingly.
     * For example:
     * +   `google-api-python-client/1.4.0`:
     *     The request was made by the Google API client for Python.
     * +   `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`:
     *     The request was made by the Google Cloud SDK CLI (gcloud).
     * +   `AppEngine-Google; (+http://code.google.com/appengine; appid: s~my-project`:
     *     The request was made from the `my-project` App Engine app.
     *
     * Generated from protobuf field <code>string caller_supplied_user_agent = 2;</code>
     * @return string
     */
    public function getCallerSuppliedUserAgent()
    {
        return $this->caller_supplied_user_agent;
    }

    /**
     * The user agent of the caller.
     * This information is not authenticated and should be treated accordingly.
     * For example:
     * +   `google-api-python-client/1.4.0`:
     *     The request was made by the Google API client for Python.
     * +   `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`:
     *     The request was made by the Google Cloud SDK CLI (gcloud).
     * +   `AppEngine-Google; (+http://code.google.com/appengine; appid: s~my-project`:
     *     The request was made from the `my-project` App Engine app.
     *
     * Generated from protobuf field <code>string caller_supplied_user_agent = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setCallerSuppliedUserAgent($var)
    {
        GPBUtil::checkString($var, True);
        $this->caller_supplied_user_agent = $var;

        return $this;
    }

}

