<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/monitoring/v3/alert.proto

namespace Google\Cloud\Monitoring\V3\AlertPolicy;

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

/**
 * Documentation that is included in the notifications and incidents
 * pertaining to this policy.
 *
 * Generated from protobuf message <code>google.monitoring.v3.AlertPolicy.Documentation</code>
 */
class Documentation extends \Google\Protobuf\Internal\Message
{
    /**
     * The body of the documentation, interpreted according to `mime_type`.
     * The content may not exceed 8,192 Unicode characters and may not exceed
     * more than 10,240 bytes when encoded in UTF-8 format, whichever is
     * smaller. This text can be [templatized by using
     * variables](https://cloud.google.com/monitoring/alerts/doc-variables#doc-vars).
     *
     * Generated from protobuf field <code>string content = 1;</code>
     */
    protected $content = '';
    /**
     * The format of the `content` field. Presently, only the value
     * `"text/markdown"` is supported. See
     * [Markdown](https://en.wikipedia.org/wiki/Markdown) for more information.
     *
     * Generated from protobuf field <code>string mime_type = 2;</code>
     */
    protected $mime_type = '';
    /**
     * Optional. The subject line of the notification. The subject line may not
     * exceed 10,240 bytes. In notifications generated by this policy, the
     * contents of the subject line after variable expansion will be truncated
     * to 255 bytes or shorter at the latest UTF-8 character boundary. The
     * 255-byte limit is recommended by [this
     * thread](https://stackoverflow.com/questions/1592291/what-is-the-email-subject-length-limit).
     * It is both the limit imposed by some third-party ticketing products and
     * it is common to define textual fields in databases as VARCHAR(255).
     * The contents of the subject line can be [templatized by using
     * variables](https://cloud.google.com/monitoring/alerts/doc-variables#doc-vars).
     * If this field is missing or empty, a default subject line will be
     * generated.
     *
     * Generated from protobuf field <code>string subject = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $subject = '';
    /**
     * Optional. Links to content such as playbooks, repositories, and other
     * resources. This field can contain up to 3 entries.
     *
     * Generated from protobuf field <code>repeated .google.monitoring.v3.AlertPolicy.Documentation.Link links = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $links;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $content
     *           The body of the documentation, interpreted according to `mime_type`.
     *           The content may not exceed 8,192 Unicode characters and may not exceed
     *           more than 10,240 bytes when encoded in UTF-8 format, whichever is
     *           smaller. This text can be [templatized by using
     *           variables](https://cloud.google.com/monitoring/alerts/doc-variables#doc-vars).
     *     @type string $mime_type
     *           The format of the `content` field. Presently, only the value
     *           `"text/markdown"` is supported. See
     *           [Markdown](https://en.wikipedia.org/wiki/Markdown) for more information.
     *     @type string $subject
     *           Optional. The subject line of the notification. The subject line may not
     *           exceed 10,240 bytes. In notifications generated by this policy, the
     *           contents of the subject line after variable expansion will be truncated
     *           to 255 bytes or shorter at the latest UTF-8 character boundary. The
     *           255-byte limit is recommended by [this
     *           thread](https://stackoverflow.com/questions/1592291/what-is-the-email-subject-length-limit).
     *           It is both the limit imposed by some third-party ticketing products and
     *           it is common to define textual fields in databases as VARCHAR(255).
     *           The contents of the subject line can be [templatized by using
     *           variables](https://cloud.google.com/monitoring/alerts/doc-variables#doc-vars).
     *           If this field is missing or empty, a default subject line will be
     *           generated.
     *     @type array<\Google\Cloud\Monitoring\V3\AlertPolicy\Documentation\Link>|\Google\Protobuf\Internal\RepeatedField $links
     *           Optional. Links to content such as playbooks, repositories, and other
     *           resources. This field can contain up to 3 entries.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Monitoring\V3\Alert::initOnce();
        parent::__construct($data);
    }

    /**
     * The body of the documentation, interpreted according to `mime_type`.
     * The content may not exceed 8,192 Unicode characters and may not exceed
     * more than 10,240 bytes when encoded in UTF-8 format, whichever is
     * smaller. This text can be [templatized by using
     * variables](https://cloud.google.com/monitoring/alerts/doc-variables#doc-vars).
     *
     * Generated from protobuf field <code>string content = 1;</code>
     * @return string
     */
    public function getContent()
    {
        return $this->content;
    }

    /**
     * The body of the documentation, interpreted according to `mime_type`.
     * The content may not exceed 8,192 Unicode characters and may not exceed
     * more than 10,240 bytes when encoded in UTF-8 format, whichever is
     * smaller. This text can be [templatized by using
     * variables](https://cloud.google.com/monitoring/alerts/doc-variables#doc-vars).
     *
     * Generated from protobuf field <code>string content = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setContent($var)
    {
        GPBUtil::checkString($var, True);
        $this->content = $var;

        return $this;
    }

    /**
     * The format of the `content` field. Presently, only the value
     * `"text/markdown"` is supported. See
     * [Markdown](https://en.wikipedia.org/wiki/Markdown) for more information.
     *
     * Generated from protobuf field <code>string mime_type = 2;</code>
     * @return string
     */
    public function getMimeType()
    {
        return $this->mime_type;
    }

    /**
     * The format of the `content` field. Presently, only the value
     * `"text/markdown"` is supported. See
     * [Markdown](https://en.wikipedia.org/wiki/Markdown) for more information.
     *
     * Generated from protobuf field <code>string mime_type = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setMimeType($var)
    {
        GPBUtil::checkString($var, True);
        $this->mime_type = $var;

        return $this;
    }

    /**
     * Optional. The subject line of the notification. The subject line may not
     * exceed 10,240 bytes. In notifications generated by this policy, the
     * contents of the subject line after variable expansion will be truncated
     * to 255 bytes or shorter at the latest UTF-8 character boundary. The
     * 255-byte limit is recommended by [this
     * thread](https://stackoverflow.com/questions/1592291/what-is-the-email-subject-length-limit).
     * It is both the limit imposed by some third-party ticketing products and
     * it is common to define textual fields in databases as VARCHAR(255).
     * The contents of the subject line can be [templatized by using
     * variables](https://cloud.google.com/monitoring/alerts/doc-variables#doc-vars).
     * If this field is missing or empty, a default subject line will be
     * generated.
     *
     * Generated from protobuf field <code>string subject = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getSubject()
    {
        return $this->subject;
    }

    /**
     * Optional. The subject line of the notification. The subject line may not
     * exceed 10,240 bytes. In notifications generated by this policy, the
     * contents of the subject line after variable expansion will be truncated
     * to 255 bytes or shorter at the latest UTF-8 character boundary. The
     * 255-byte limit is recommended by [this
     * thread](https://stackoverflow.com/questions/1592291/what-is-the-email-subject-length-limit).
     * It is both the limit imposed by some third-party ticketing products and
     * it is common to define textual fields in databases as VARCHAR(255).
     * The contents of the subject line can be [templatized by using
     * variables](https://cloud.google.com/monitoring/alerts/doc-variables#doc-vars).
     * If this field is missing or empty, a default subject line will be
     * generated.
     *
     * Generated from protobuf field <code>string subject = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setSubject($var)
    {
        GPBUtil::checkString($var, True);
        $this->subject = $var;

        return $this;
    }

    /**
     * Optional. Links to content such as playbooks, repositories, and other
     * resources. This field can contain up to 3 entries.
     *
     * Generated from protobuf field <code>repeated .google.monitoring.v3.AlertPolicy.Documentation.Link links = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getLinks()
    {
        return $this->links;
    }

    /**
     * Optional. Links to content such as playbooks, repositories, and other
     * resources. This field can contain up to 3 entries.
     *
     * Generated from protobuf field <code>repeated .google.monitoring.v3.AlertPolicy.Documentation.Link links = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param array<\Google\Cloud\Monitoring\V3\AlertPolicy\Documentation\Link>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setLinks($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\AlertPolicy\Documentation\Link::class);
        $this->links = $arr;

        return $this;
    }

}


