<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/devtools/clouddebugger/v2/data.proto

namespace Google\Cloud\Debugger\V2;

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

/**
 * Represents a message with parameters.
 *
 * Generated from protobuf message <code>google.devtools.clouddebugger.v2.FormatMessage</code>
 */
class FormatMessage extends \Google\Protobuf\Internal\Message
{
    /**
     * Format template for the message. The `format` uses placeholders `$0`,
     * `$1`, etc. to reference parameters. `$$` can be used to denote the `$`
     * character.
     * Examples:
     * *   `Failed to load '$0' which helps debug $1 the first time it
     *     is loaded.  Again, $0 is very important.`
     * *   `Please pay $$10 to use $0 instead of $1.`
     *
     * Generated from protobuf field <code>string format = 1;</code>
     */
    private $format = '';
    /**
     * Optional parameters to be embedded into the message.
     *
     * Generated from protobuf field <code>repeated string parameters = 2;</code>
     */
    private $parameters;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $format
     *           Format template for the message. The `format` uses placeholders `$0`,
     *           `$1`, etc. to reference parameters. `$$` can be used to denote the `$`
     *           character.
     *           Examples:
     *           *   `Failed to load '$0' which helps debug $1 the first time it
     *               is loaded.  Again, $0 is very important.`
     *           *   `Please pay $$10 to use $0 instead of $1.`
     *     @type string[]|\Google\Protobuf\Internal\RepeatedField $parameters
     *           Optional parameters to be embedded into the message.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Devtools\Clouddebugger\V2\Data::initOnce();
        parent::__construct($data);
    }

    /**
     * Format template for the message. The `format` uses placeholders `$0`,
     * `$1`, etc. to reference parameters. `$$` can be used to denote the `$`
     * character.
     * Examples:
     * *   `Failed to load '$0' which helps debug $1 the first time it
     *     is loaded.  Again, $0 is very important.`
     * *   `Please pay $$10 to use $0 instead of $1.`
     *
     * Generated from protobuf field <code>string format = 1;</code>
     * @return string
     */
    public function getFormat()
    {
        return $this->format;
    }

    /**
     * Format template for the message. The `format` uses placeholders `$0`,
     * `$1`, etc. to reference parameters. `$$` can be used to denote the `$`
     * character.
     * Examples:
     * *   `Failed to load '$0' which helps debug $1 the first time it
     *     is loaded.  Again, $0 is very important.`
     * *   `Please pay $$10 to use $0 instead of $1.`
     *
     * Generated from protobuf field <code>string format = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setFormat($var)
    {
        GPBUtil::checkString($var, True);
        $this->format = $var;

        return $this;
    }

    /**
     * Optional parameters to be embedded into the message.
     *
     * Generated from protobuf field <code>repeated string parameters = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getParameters()
    {
        return $this->parameters;
    }

    /**
     * Optional parameters to be embedded into the message.
     *
     * Generated from protobuf field <code>repeated string parameters = 2;</code>
     * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setParameters($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->parameters = $arr;

        return $this;
    }

}

