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

namespace PhpWA\Protocol\Proto;

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

/**
 * Generated from protobuf message <code>proto.UserPassword</code>
 */
class UserPassword extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional .proto.UserPassword.Encoding encoding = 1;</code>
     */
    protected $encoding = null;
    /**
     * Generated from protobuf field <code>optional .proto.UserPassword.Transformer transformer = 2;</code>
     */
    protected $transformer = null;
    /**
     * Generated from protobuf field <code>repeated .proto.UserPassword.TransformerArg transformerArg = 3;</code>
     */
    private $transformerArg;
    /**
     * Generated from protobuf field <code>optional bytes transformedData = 4;</code>
     */
    protected $transformedData = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $encoding
     *     @type int $transformer
     *     @type \PhpWA\Protocol\Proto\UserPassword\TransformerArg[] $transformerArg
     *     @type string $transformedData
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>optional .proto.UserPassword.Encoding encoding = 1;</code>
     * @return int
     */
    public function getEncoding()
    {
        return isset($this->encoding) ? $this->encoding : 0;
    }

    public function hasEncoding()
    {
        return isset($this->encoding);
    }

    public function clearEncoding()
    {
        unset($this->encoding);
    }

    /**
     * Generated from protobuf field <code>optional .proto.UserPassword.Encoding encoding = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setEncoding($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\UserPassword\Encoding::class);
        $this->encoding = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.UserPassword.Transformer transformer = 2;</code>
     * @return int
     */
    public function getTransformer()
    {
        return isset($this->transformer) ? $this->transformer : 0;
    }

    public function hasTransformer()
    {
        return isset($this->transformer);
    }

    public function clearTransformer()
    {
        unset($this->transformer);
    }

    /**
     * Generated from protobuf field <code>optional .proto.UserPassword.Transformer transformer = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setTransformer($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\UserPassword\Transformer::class);
        $this->transformer = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .proto.UserPassword.TransformerArg transformerArg = 3;</code>
     * @return RepeatedField<\PhpWA\Protocol\Proto\UserPassword\TransformerArg>
     */
    public function getTransformerArg()
    {
        return $this->transformerArg;
    }

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

        return $this;
    }

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

    public function hasTransformedData()
    {
        return isset($this->transformedData);
    }

    public function clearTransformedData()
    {
        unset($this->transformedData);
    }

    /**
     * Generated from protobuf field <code>optional bytes transformedData = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setTransformedData($var)
    {
        GPBUtil::checkString($var, False);
        $this->transformedData = $var;

        return $this;
    }

}

