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

namespace Google\Cloud\Container\V1;

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

/**
 * AutopilotCompatibilityIssue contains information about a specific
 * compatibility issue with Autopilot mode.
 *
 * Generated from protobuf message <code>google.container.v1.AutopilotCompatibilityIssue</code>
 */
class AutopilotCompatibilityIssue extends \Google\Protobuf\Internal\Message
{
    /**
     * The last time when this issue was observed.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp last_observation = 1;</code>
     */
    private $last_observation = null;
    /**
     * The constraint type of the issue.
     *
     * Generated from protobuf field <code>string constraint_type = 2;</code>
     */
    private $constraint_type = '';
    /**
     * The incompatibility type of this issue.
     *
     * Generated from protobuf field <code>.google.container.v1.AutopilotCompatibilityIssue.IssueType incompatibility_type = 3;</code>
     */
    private $incompatibility_type = 0;
    /**
     * The name of the resources which are subject to this issue.
     *
     * Generated from protobuf field <code>repeated string subjects = 4;</code>
     */
    private $subjects;
    /**
     * A URL to a public documnetation, which addresses resolving this issue.
     *
     * Generated from protobuf field <code>string documentation_url = 5;</code>
     */
    private $documentation_url = '';
    /**
     * The description of the issue.
     *
     * Generated from protobuf field <code>string description = 6;</code>
     */
    private $description = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Protobuf\Timestamp $last_observation
     *           The last time when this issue was observed.
     *     @type string $constraint_type
     *           The constraint type of the issue.
     *     @type int $incompatibility_type
     *           The incompatibility type of this issue.
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $subjects
     *           The name of the resources which are subject to this issue.
     *     @type string $documentation_url
     *           A URL to a public documnetation, which addresses resolving this issue.
     *     @type string $description
     *           The description of the issue.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Container\V1\ClusterService::initOnce();
        parent::__construct($data);
    }

    /**
     * The last time when this issue was observed.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp last_observation = 1;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getLastObservation()
    {
        return $this->last_observation;
    }

    public function hasLastObservation()
    {
        return isset($this->last_observation);
    }

    public function clearLastObservation()
    {
        unset($this->last_observation);
    }

    /**
     * The last time when this issue was observed.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp last_observation = 1;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setLastObservation($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->last_observation = $var;

        return $this;
    }

    /**
     * The constraint type of the issue.
     *
     * Generated from protobuf field <code>string constraint_type = 2;</code>
     * @return string
     */
    public function getConstraintType()
    {
        return $this->constraint_type;
    }

    /**
     * The constraint type of the issue.
     *
     * Generated from protobuf field <code>string constraint_type = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setConstraintType($var)
    {
        GPBUtil::checkString($var, True);
        $this->constraint_type = $var;

        return $this;
    }

    /**
     * The incompatibility type of this issue.
     *
     * Generated from protobuf field <code>.google.container.v1.AutopilotCompatibilityIssue.IssueType incompatibility_type = 3;</code>
     * @return int
     */
    public function getIncompatibilityType()
    {
        return $this->incompatibility_type;
    }

    /**
     * The incompatibility type of this issue.
     *
     * Generated from protobuf field <code>.google.container.v1.AutopilotCompatibilityIssue.IssueType incompatibility_type = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setIncompatibilityType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Container\V1\AutopilotCompatibilityIssue\IssueType::class);
        $this->incompatibility_type = $var;

        return $this;
    }

    /**
     * The name of the resources which are subject to this issue.
     *
     * Generated from protobuf field <code>repeated string subjects = 4;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getSubjects()
    {
        return $this->subjects;
    }

    /**
     * The name of the resources which are subject to this issue.
     *
     * Generated from protobuf field <code>repeated string subjects = 4;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setSubjects($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->subjects = $arr;

        return $this;
    }

    /**
     * A URL to a public documnetation, which addresses resolving this issue.
     *
     * Generated from protobuf field <code>string documentation_url = 5;</code>
     * @return string
     */
    public function getDocumentationUrl()
    {
        return $this->documentation_url;
    }

    /**
     * A URL to a public documnetation, which addresses resolving this issue.
     *
     * Generated from protobuf field <code>string documentation_url = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setDocumentationUrl($var)
    {
        GPBUtil::checkString($var, True);
        $this->documentation_url = $var;

        return $this;
    }

    /**
     * The description of the issue.
     *
     * Generated from protobuf field <code>string description = 6;</code>
     * @return string
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * The description of the issue.
     *
     * Generated from protobuf field <code>string description = 6;</code>
     * @param string $var
     * @return $this
     */
    public function setDescription($var)
    {
        GPBUtil::checkString($var, True);
        $this->description = $var;

        return $this;
    }

}

