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

namespace Google\Cloud\RecaptchaEnterprise\V1\TransactionData;

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

/**
 * Details about the transaction from the gateway.
 *
 * Generated from protobuf message <code>google.cloud.recaptchaenterprise.v1.TransactionData.GatewayInfo</code>
 */
class GatewayInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. Name of the gateway service (for example, stripe, square,
     * paypal).
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $name = '';
    /**
     * Optional. Gateway response code describing the state of the transaction.
     *
     * Generated from protobuf field <code>string gateway_response_code = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $gateway_response_code = '';
    /**
     * Optional. AVS response code from the gateway
     * (available only when reCAPTCHA Enterprise is called after authorization).
     *
     * Generated from protobuf field <code>string avs_response_code = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $avs_response_code = '';
    /**
     * Optional. CVV response code from the gateway
     * (available only when reCAPTCHA Enterprise is called after authorization).
     *
     * Generated from protobuf field <code>string cvv_response_code = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $cvv_response_code = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Optional. Name of the gateway service (for example, stripe, square,
     *           paypal).
     *     @type string $gateway_response_code
     *           Optional. Gateway response code describing the state of the transaction.
     *     @type string $avs_response_code
     *           Optional. AVS response code from the gateway
     *           (available only when reCAPTCHA Enterprise is called after authorization).
     *     @type string $cvv_response_code
     *           Optional. CVV response code from the gateway
     *           (available only when reCAPTCHA Enterprise is called after authorization).
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. Name of the gateway service (for example, stripe, square,
     * paypal).
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Optional. Name of the gateway service (for example, stripe, square,
     * paypal).
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Optional. Gateway response code describing the state of the transaction.
     *
     * Generated from protobuf field <code>string gateway_response_code = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getGatewayResponseCode()
    {
        return $this->gateway_response_code;
    }

    /**
     * Optional. Gateway response code describing the state of the transaction.
     *
     * Generated from protobuf field <code>string gateway_response_code = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setGatewayResponseCode($var)
    {
        GPBUtil::checkString($var, True);
        $this->gateway_response_code = $var;

        return $this;
    }

    /**
     * Optional. AVS response code from the gateway
     * (available only when reCAPTCHA Enterprise is called after authorization).
     *
     * Generated from protobuf field <code>string avs_response_code = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getAvsResponseCode()
    {
        return $this->avs_response_code;
    }

    /**
     * Optional. AVS response code from the gateway
     * (available only when reCAPTCHA Enterprise is called after authorization).
     *
     * Generated from protobuf field <code>string avs_response_code = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setAvsResponseCode($var)
    {
        GPBUtil::checkString($var, True);
        $this->avs_response_code = $var;

        return $this;
    }

    /**
     * Optional. CVV response code from the gateway
     * (available only when reCAPTCHA Enterprise is called after authorization).
     *
     * Generated from protobuf field <code>string cvv_response_code = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getCvvResponseCode()
    {
        return $this->cvv_response_code;
    }

    /**
     * Optional. CVV response code from the gateway
     * (available only when reCAPTCHA Enterprise is called after authorization).
     *
     * Generated from protobuf field <code>string cvv_response_code = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setCvvResponseCode($var)
    {
        GPBUtil::checkString($var, True);
        $this->cvv_response_code = $var;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GatewayInfo::class, \Google\Cloud\RecaptchaEnterprise\V1\TransactionData_GatewayInfo::class);

