<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: WAProto.proto

namespace PhpWA\Protocol\Proto\SyncActionValue;

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

/**
 * Generated from protobuf message <code>proto.SyncActionValue.CustomPaymentMethod</code>
 */
class CustomPaymentMethod extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional string credentialId = 1;</code>
     */
    protected $credentialId = null;
    /**
     * Generated from protobuf field <code>optional string country = 2;</code>
     */
    protected $country = null;
    /**
     * Generated from protobuf field <code>optional string type = 3;</code>
     */
    protected $type = null;
    /**
     * Generated from protobuf field <code>repeated .proto.SyncActionValue.CustomPaymentMethodMetadata metadata = 4;</code>
     */
    private $metadata;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $credentialId
     *     @type string $country
     *     @type string $type
     *     @type \PhpWA\Protocol\Proto\SyncActionValue\CustomPaymentMethodMetadata[] $metadata
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>optional string credentialId = 1;</code>
     * @return string
     */
    public function getCredentialId()
    {
        return isset($this->credentialId) ? $this->credentialId : '';
    }

    public function hasCredentialId()
    {
        return isset($this->credentialId);
    }

    public function clearCredentialId()
    {
        unset($this->credentialId);
    }

    /**
     * Generated from protobuf field <code>optional string credentialId = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setCredentialId($var)
    {
        GPBUtil::checkString($var, True);
        $this->credentialId = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional string country = 2;</code>
     * @return string
     */
    public function getCountry()
    {
        return isset($this->country) ? $this->country : '';
    }

    public function hasCountry()
    {
        return isset($this->country);
    }

    public function clearCountry()
    {
        unset($this->country);
    }

    /**
     * Generated from protobuf field <code>optional string country = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setCountry($var)
    {
        GPBUtil::checkString($var, True);
        $this->country = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional string type = 3;</code>
     * @return string
     */
    public function getType()
    {
        return isset($this->type) ? $this->type : '';
    }

    public function hasType()
    {
        return isset($this->type);
    }

    public function clearType()
    {
        unset($this->type);
    }

    /**
     * Generated from protobuf field <code>optional string type = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkString($var, True);
        $this->type = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .proto.SyncActionValue.CustomPaymentMethodMetadata metadata = 4;</code>
     * @return RepeatedField<\PhpWA\Protocol\Proto\SyncActionValue\CustomPaymentMethodMetadata>
     */
    public function getMetadata()
    {
        return $this->metadata;
    }

    /**
     * Generated from protobuf field <code>repeated .proto.SyncActionValue.CustomPaymentMethodMetadata metadata = 4;</code>
     * @param \PhpWA\Protocol\Proto\SyncActionValue\CustomPaymentMethodMetadata[] $var
     * @return $this
     */
    public function setMetadata($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \PhpWA\Protocol\Proto\SyncActionValue\CustomPaymentMethodMetadata::class);
        $this->metadata = $arr;

        return $this;
    }

}

