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

namespace Google\Cloud\OracleDatabase\V1;

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

/**
 * The request for `AutonomousDatabase.GenerateWallet`.
 *
 * Generated from protobuf message <code>google.cloud.oracledatabase.v1.GenerateAutonomousDatabaseWalletRequest</code>
 */
class GenerateAutonomousDatabaseWalletRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The name of the Autonomous Database in the following format:
     * projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $name = '';
    /**
     * Optional. The type of wallet generation for the Autonomous Database. The
     * default value is SINGLE.
     *
     * Generated from protobuf field <code>.google.cloud.oracledatabase.v1.GenerateType type = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $type = 0;
    /**
     * Optional. True when requesting regional connection strings in PDB connect
     * info, applicable to cross-region Data Guard only.
     *
     * Generated from protobuf field <code>bool is_regional = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $is_regional = false;
    /**
     * Required. The password used to encrypt the keys inside the wallet. The
     * password must be a minimum of 8 characters.
     *
     * Generated from protobuf field <code>string password = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $password = '';

    /**
     * @param string $name       Required. The name of the Autonomous Database in the following format:
     *                           projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}. Please see
     *                           {@see OracleDatabaseClient::autonomousDatabaseName()} for help formatting this field.
     * @param int    $type       Optional. The type of wallet generation for the Autonomous Database. The
     *                           default value is SINGLE.
     *                           For allowed values, use constants defined on {@see \Google\Cloud\OracleDatabase\V1\GenerateType}
     * @param bool   $isRegional Optional. True when requesting regional connection strings in PDB connect
     *                           info, applicable to cross-region Data Guard only.
     * @param string $password   Required. The password used to encrypt the keys inside the wallet. The
     *                           password must be a minimum of 8 characters.
     *
     * @return \Google\Cloud\OracleDatabase\V1\GenerateAutonomousDatabaseWalletRequest
     *
     * @experimental
     */
    public static function build(string $name, int $type, bool $isRegional, string $password): self
    {
        return (new self())
            ->setName($name)
            ->setType($type)
            ->setIsRegional($isRegional)
            ->setPassword($password);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Required. The name of the Autonomous Database in the following format:
     *           projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}.
     *     @type int $type
     *           Optional. The type of wallet generation for the Autonomous Database. The
     *           default value is SINGLE.
     *     @type bool $is_regional
     *           Optional. True when requesting regional connection strings in PDB connect
     *           info, applicable to cross-region Data Guard only.
     *     @type string $password
     *           Required. The password used to encrypt the keys inside the wallet. The
     *           password must be a minimum of 8 characters.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The name of the Autonomous Database in the following format:
     * projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Required. The name of the Autonomous Database in the following format:
     * projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Optional. The type of wallet generation for the Autonomous Database. The
     * default value is SINGLE.
     *
     * Generated from protobuf field <code>.google.cloud.oracledatabase.v1.GenerateType type = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * Optional. The type of wallet generation for the Autonomous Database. The
     * default value is SINGLE.
     *
     * Generated from protobuf field <code>.google.cloud.oracledatabase.v1.GenerateType type = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\GenerateType::class);
        $this->type = $var;

        return $this;
    }

    /**
     * Optional. True when requesting regional connection strings in PDB connect
     * info, applicable to cross-region Data Guard only.
     *
     * Generated from protobuf field <code>bool is_regional = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return bool
     */
    public function getIsRegional()
    {
        return $this->is_regional;
    }

    /**
     * Optional. True when requesting regional connection strings in PDB connect
     * info, applicable to cross-region Data Guard only.
     *
     * Generated from protobuf field <code>bool is_regional = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param bool $var
     * @return $this
     */
    public function setIsRegional($var)
    {
        GPBUtil::checkBool($var);
        $this->is_regional = $var;

        return $this;
    }

    /**
     * Required. The password used to encrypt the keys inside the wallet. The
     * password must be a minimum of 8 characters.
     *
     * Generated from protobuf field <code>string password = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getPassword()
    {
        return $this->password;
    }

    /**
     * Required. The password used to encrypt the keys inside the wallet. The
     * password must be a minimum of 8 characters.
     *
     * Generated from protobuf field <code>string password = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setPassword($var)
    {
        GPBUtil::checkString($var, True);
        $this->password = $var;

        return $this;
    }

}

