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

namespace Google\Cloud\NetworkManagement\V1;

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

/**
 * For display only. Metadata associated with a specific load balancer backend.
 *
 * Generated from protobuf message <code>google.cloud.networkmanagement.v1.LoadBalancerBackend</code>
 */
class LoadBalancerBackend extends \Google\Protobuf\Internal\Message
{
    /**
     * Name of a Compute Engine instance or network endpoint.
     *
     * Generated from protobuf field <code>string display_name = 1;</code>
     */
    private $display_name = '';
    /**
     * URI of a Compute Engine instance or network endpoint.
     *
     * Generated from protobuf field <code>string uri = 2;</code>
     */
    private $uri = '';
    /**
     * State of the health check firewall configuration.
     *
     * Generated from protobuf field <code>.google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState health_check_firewall_state = 3;</code>
     */
    private $health_check_firewall_state = 0;
    /**
     * A list of firewall rule URIs allowing probes from health check IP ranges.
     *
     * Generated from protobuf field <code>repeated string health_check_allowing_firewall_rules = 4;</code>
     */
    private $health_check_allowing_firewall_rules;
    /**
     * A list of firewall rule URIs blocking probes from health check IP ranges.
     *
     * Generated from protobuf field <code>repeated string health_check_blocking_firewall_rules = 5;</code>
     */
    private $health_check_blocking_firewall_rules;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $display_name
     *           Name of a Compute Engine instance or network endpoint.
     *     @type string $uri
     *           URI of a Compute Engine instance or network endpoint.
     *     @type int $health_check_firewall_state
     *           State of the health check firewall configuration.
     *     @type string[]|\Google\Protobuf\Internal\RepeatedField $health_check_allowing_firewall_rules
     *           A list of firewall rule URIs allowing probes from health check IP ranges.
     *     @type string[]|\Google\Protobuf\Internal\RepeatedField $health_check_blocking_firewall_rules
     *           A list of firewall rule URIs blocking probes from health check IP ranges.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce();
        parent::__construct($data);
    }

    /**
     * Name of a Compute Engine instance or network endpoint.
     *
     * Generated from protobuf field <code>string display_name = 1;</code>
     * @return string
     */
    public function getDisplayName()
    {
        return $this->display_name;
    }

    /**
     * Name of a Compute Engine instance or network endpoint.
     *
     * Generated from protobuf field <code>string display_name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setDisplayName($var)
    {
        GPBUtil::checkString($var, True);
        $this->display_name = $var;

        return $this;
    }

    /**
     * URI of a Compute Engine instance or network endpoint.
     *
     * Generated from protobuf field <code>string uri = 2;</code>
     * @return string
     */
    public function getUri()
    {
        return $this->uri;
    }

    /**
     * URI of a Compute Engine instance or network endpoint.
     *
     * Generated from protobuf field <code>string uri = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setUri($var)
    {
        GPBUtil::checkString($var, True);
        $this->uri = $var;

        return $this;
    }

    /**
     * State of the health check firewall configuration.
     *
     * Generated from protobuf field <code>.google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState health_check_firewall_state = 3;</code>
     * @return int
     */
    public function getHealthCheckFirewallState()
    {
        return $this->health_check_firewall_state;
    }

    /**
     * State of the health check firewall configuration.
     *
     * Generated from protobuf field <code>.google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState health_check_firewall_state = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setHealthCheckFirewallState($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\LoadBalancerBackend\HealthCheckFirewallState::class);
        $this->health_check_firewall_state = $var;

        return $this;
    }

    /**
     * A list of firewall rule URIs allowing probes from health check IP ranges.
     *
     * Generated from protobuf field <code>repeated string health_check_allowing_firewall_rules = 4;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getHealthCheckAllowingFirewallRules()
    {
        return $this->health_check_allowing_firewall_rules;
    }

    /**
     * A list of firewall rule URIs allowing probes from health check IP ranges.
     *
     * Generated from protobuf field <code>repeated string health_check_allowing_firewall_rules = 4;</code>
     * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setHealthCheckAllowingFirewallRules($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->health_check_allowing_firewall_rules = $arr;

        return $this;
    }

    /**
     * A list of firewall rule URIs blocking probes from health check IP ranges.
     *
     * Generated from protobuf field <code>repeated string health_check_blocking_firewall_rules = 5;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getHealthCheckBlockingFirewallRules()
    {
        return $this->health_check_blocking_firewall_rules;
    }

    /**
     * A list of firewall rule URIs blocking probes from health check IP ranges.
     *
     * Generated from protobuf field <code>repeated string health_check_blocking_firewall_rules = 5;</code>
     * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setHealthCheckBlockingFirewallRules($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->health_check_blocking_firewall_rules = $arr;

        return $this;
    }

}

