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

namespace Google\Cloud\StorageTransfer\V1;

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

/**
 * S3CompatibleMetadata contains the metadata fields that apply to the basic
 * types of S3-compatible data providers.
 *
 * Generated from protobuf message <code>google.storagetransfer.v1.S3CompatibleMetadata</code>
 */
class S3CompatibleMetadata extends \Google\Protobuf\Internal\Message
{
    /**
     * Specifies the authentication and authorization method used by the storage
     * service. When not specified, Transfer Service will attempt to determine
     * right auth method to use.
     *
     * Generated from protobuf field <code>.google.storagetransfer.v1.S3CompatibleMetadata.AuthMethod auth_method = 1;</code>
     */
    private $auth_method = 0;
    /**
     * Specifies the API request model used to call the storage service. When not
     * specified, the default value of RequestModel
     * REQUEST_MODEL_VIRTUAL_HOSTED_STYLE is used.
     *
     * Generated from protobuf field <code>.google.storagetransfer.v1.S3CompatibleMetadata.RequestModel request_model = 2;</code>
     */
    private $request_model = 0;
    /**
     * Specifies the network protocol of the agent. When not specified, the
     * default value of NetworkProtocol NETWORK_PROTOCOL_HTTPS is used.
     *
     * Generated from protobuf field <code>.google.storagetransfer.v1.S3CompatibleMetadata.NetworkProtocol protocol = 3;</code>
     */
    private $protocol = 0;
    /**
     * The Listing API to use for discovering objects. When not specified,
     * Transfer Service will attempt to determine the right API to use.
     *
     * Generated from protobuf field <code>.google.storagetransfer.v1.S3CompatibleMetadata.ListApi list_api = 4;</code>
     */
    private $list_api = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $auth_method
     *           Specifies the authentication and authorization method used by the storage
     *           service. When not specified, Transfer Service will attempt to determine
     *           right auth method to use.
     *     @type int $request_model
     *           Specifies the API request model used to call the storage service. When not
     *           specified, the default value of RequestModel
     *           REQUEST_MODEL_VIRTUAL_HOSTED_STYLE is used.
     *     @type int $protocol
     *           Specifies the network protocol of the agent. When not specified, the
     *           default value of NetworkProtocol NETWORK_PROTOCOL_HTTPS is used.
     *     @type int $list_api
     *           The Listing API to use for discovering objects. When not specified,
     *           Transfer Service will attempt to determine the right API to use.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce();
        parent::__construct($data);
    }

    /**
     * Specifies the authentication and authorization method used by the storage
     * service. When not specified, Transfer Service will attempt to determine
     * right auth method to use.
     *
     * Generated from protobuf field <code>.google.storagetransfer.v1.S3CompatibleMetadata.AuthMethod auth_method = 1;</code>
     * @return int
     */
    public function getAuthMethod()
    {
        return $this->auth_method;
    }

    /**
     * Specifies the authentication and authorization method used by the storage
     * service. When not specified, Transfer Service will attempt to determine
     * right auth method to use.
     *
     * Generated from protobuf field <code>.google.storagetransfer.v1.S3CompatibleMetadata.AuthMethod auth_method = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setAuthMethod($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\StorageTransfer\V1\S3CompatibleMetadata\AuthMethod::class);
        $this->auth_method = $var;

        return $this;
    }

    /**
     * Specifies the API request model used to call the storage service. When not
     * specified, the default value of RequestModel
     * REQUEST_MODEL_VIRTUAL_HOSTED_STYLE is used.
     *
     * Generated from protobuf field <code>.google.storagetransfer.v1.S3CompatibleMetadata.RequestModel request_model = 2;</code>
     * @return int
     */
    public function getRequestModel()
    {
        return $this->request_model;
    }

    /**
     * Specifies the API request model used to call the storage service. When not
     * specified, the default value of RequestModel
     * REQUEST_MODEL_VIRTUAL_HOSTED_STYLE is used.
     *
     * Generated from protobuf field <code>.google.storagetransfer.v1.S3CompatibleMetadata.RequestModel request_model = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setRequestModel($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\StorageTransfer\V1\S3CompatibleMetadata\RequestModel::class);
        $this->request_model = $var;

        return $this;
    }

    /**
     * Specifies the network protocol of the agent. When not specified, the
     * default value of NetworkProtocol NETWORK_PROTOCOL_HTTPS is used.
     *
     * Generated from protobuf field <code>.google.storagetransfer.v1.S3CompatibleMetadata.NetworkProtocol protocol = 3;</code>
     * @return int
     */
    public function getProtocol()
    {
        return $this->protocol;
    }

    /**
     * Specifies the network protocol of the agent. When not specified, the
     * default value of NetworkProtocol NETWORK_PROTOCOL_HTTPS is used.
     *
     * Generated from protobuf field <code>.google.storagetransfer.v1.S3CompatibleMetadata.NetworkProtocol protocol = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setProtocol($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\StorageTransfer\V1\S3CompatibleMetadata\NetworkProtocol::class);
        $this->protocol = $var;

        return $this;
    }

    /**
     * The Listing API to use for discovering objects. When not specified,
     * Transfer Service will attempt to determine the right API to use.
     *
     * Generated from protobuf field <code>.google.storagetransfer.v1.S3CompatibleMetadata.ListApi list_api = 4;</code>
     * @return int
     */
    public function getListApi()
    {
        return $this->list_api;
    }

    /**
     * The Listing API to use for discovering objects. When not specified,
     * Transfer Service will attempt to determine the right API to use.
     *
     * Generated from protobuf field <code>.google.storagetransfer.v1.S3CompatibleMetadata.ListApi list_api = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setListApi($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\StorageTransfer\V1\S3CompatibleMetadata\ListApi::class);
        $this->list_api = $var;

        return $this;
    }

}

