<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/cloudcontrolspartner/v1beta/violations.proto

namespace Google\Cloud\CloudControlsPartner\V1beta;

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

/**
 * Response message for list customer violation requests
 *
 * Generated from protobuf message <code>google.cloud.cloudcontrolspartner.v1beta.ListViolationsResponse</code>
 */
class ListViolationsResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * List of violation
     *
     * Generated from protobuf field <code>repeated .google.cloud.cloudcontrolspartner.v1beta.Violation violations = 1;</code>
     */
    private $violations;
    /**
     * A token that can be sent as `page_token` to retrieve the next page.
     * If this field is omitted, there are no subsequent pages.
     *
     * Generated from protobuf field <code>string next_page_token = 2;</code>
     */
    protected $next_page_token = '';
    /**
     * Workloads that could not be reached due to permission errors or any other
     * error. Ref: https://google.aip.dev/217
     *
     * Generated from protobuf field <code>repeated string unreachable = 3;</code>
     */
    private $unreachable;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\CloudControlsPartner\V1beta\Violation[] $violations
     *           List of violation
     *     @type string $next_page_token
     *           A token that can be sent as `page_token` to retrieve the next page.
     *           If this field is omitted, there are no subsequent pages.
     *     @type string[] $unreachable
     *           Workloads that could not be reached due to permission errors or any other
     *           error. Ref: https://google.aip.dev/217
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Cloudcontrolspartner\V1Beta\Violations::initOnce();
        parent::__construct($data);
    }

    /**
     * List of violation
     *
     * Generated from protobuf field <code>repeated .google.cloud.cloudcontrolspartner.v1beta.Violation violations = 1;</code>
     * @return RepeatedField<\Google\Cloud\CloudControlsPartner\V1beta\Violation>
     */
    public function getViolations()
    {
        return $this->violations;
    }

    /**
     * List of violation
     *
     * Generated from protobuf field <code>repeated .google.cloud.cloudcontrolspartner.v1beta.Violation violations = 1;</code>
     * @param \Google\Cloud\CloudControlsPartner\V1beta\Violation[] $var
     * @return $this
     */
    public function setViolations($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\CloudControlsPartner\V1beta\Violation::class);
        $this->violations = $arr;

        return $this;
    }

    /**
     * A token that can be sent as `page_token` to retrieve the next page.
     * If this field is omitted, there are no subsequent pages.
     *
     * Generated from protobuf field <code>string next_page_token = 2;</code>
     * @return string
     */
    public function getNextPageToken()
    {
        return $this->next_page_token;
    }

    /**
     * A token that can be sent as `page_token` to retrieve the next page.
     * If this field is omitted, there are no subsequent pages.
     *
     * Generated from protobuf field <code>string next_page_token = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setNextPageToken($var)
    {
        GPBUtil::checkString($var, True);
        $this->next_page_token = $var;

        return $this;
    }

    /**
     * Workloads that could not be reached due to permission errors or any other
     * error. Ref: https://google.aip.dev/217
     *
     * Generated from protobuf field <code>repeated string unreachable = 3;</code>
     * @return RepeatedField<string>
     */
    public function getUnreachable()
    {
        return $this->unreachable;
    }

    /**
     * Workloads that could not be reached due to permission errors or any other
     * error. Ref: https://google.aip.dev/217
     *
     * Generated from protobuf field <code>repeated string unreachable = 3;</code>
     * @param string[] $var
     * @return $this
     */
    public function setUnreachable($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->unreachable = $arr;

        return $this;
    }

}

