105 lines
2.7 KiB
PHP
105 lines
2.7 KiB
PHP
|
|
<?php
|
||
|
|
/*
|
||
|
|
* Copyright 2014 Google Inc.
|
||
|
|
*
|
||
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||
|
|
* use this file except in compliance with the License. You may obtain a copy of
|
||
|
|
* the License at
|
||
|
|
*
|
||
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||
|
|
*
|
||
|
|
* Unless required by applicable law or agreed to in writing, software
|
||
|
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||
|
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||
|
|
* License for the specific language governing permissions and limitations under
|
||
|
|
* the License.
|
||
|
|
*/
|
||
|
|
|
||
|
|
namespace Google\Service\TrafficDirectorService;
|
||
|
|
|
||
|
|
class Locality extends \Google\Model
|
||
|
|
{
|
||
|
|
/**
|
||
|
|
* Region this :ref:`zone ` belongs to.
|
||
|
|
*
|
||
|
|
* @var string
|
||
|
|
*/
|
||
|
|
public $region;
|
||
|
|
/**
|
||
|
|
* When used for locality of upstream hosts, this field further splits zone
|
||
|
|
* into smaller chunks of sub-zones so they can be load balanced
|
||
|
|
* independently.
|
||
|
|
*
|
||
|
|
* @var string
|
||
|
|
*/
|
||
|
|
public $subZone;
|
||
|
|
/**
|
||
|
|
* Defines the local service zone where Envoy is running. Though optional, it
|
||
|
|
* should be set if discovery service routing is used and the discovery
|
||
|
|
* service exposes :ref:`zone data `, either in this message or via
|
||
|
|
* :option:`--service-zone`. The meaning of zone is context dependent, e.g.
|
||
|
|
* `Availability Zone (AZ) `_ on AWS, `Zone `_ on GCP, etc.
|
||
|
|
*
|
||
|
|
* @var string
|
||
|
|
*/
|
||
|
|
public $zone;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Region this :ref:`zone ` belongs to.
|
||
|
|
*
|
||
|
|
* @param string $region
|
||
|
|
*/
|
||
|
|
public function setRegion($region)
|
||
|
|
{
|
||
|
|
$this->region = $region;
|
||
|
|
}
|
||
|
|
/**
|
||
|
|
* @return string
|
||
|
|
*/
|
||
|
|
public function getRegion()
|
||
|
|
{
|
||
|
|
return $this->region;
|
||
|
|
}
|
||
|
|
/**
|
||
|
|
* When used for locality of upstream hosts, this field further splits zone
|
||
|
|
* into smaller chunks of sub-zones so they can be load balanced
|
||
|
|
* independently.
|
||
|
|
*
|
||
|
|
* @param string $subZone
|
||
|
|
*/
|
||
|
|
public function setSubZone($subZone)
|
||
|
|
{
|
||
|
|
$this->subZone = $subZone;
|
||
|
|
}
|
||
|
|
/**
|
||
|
|
* @return string
|
||
|
|
*/
|
||
|
|
public function getSubZone()
|
||
|
|
{
|
||
|
|
return $this->subZone;
|
||
|
|
}
|
||
|
|
/**
|
||
|
|
* Defines the local service zone where Envoy is running. Though optional, it
|
||
|
|
* should be set if discovery service routing is used and the discovery
|
||
|
|
* service exposes :ref:`zone data `, either in this message or via
|
||
|
|
* :option:`--service-zone`. The meaning of zone is context dependent, e.g.
|
||
|
|
* `Availability Zone (AZ) `_ on AWS, `Zone `_ on GCP, etc.
|
||
|
|
*
|
||
|
|
* @param string $zone
|
||
|
|
*/
|
||
|
|
public function setZone($zone)
|
||
|
|
{
|
||
|
|
$this->zone = $zone;
|
||
|
|
}
|
||
|
|
/**
|
||
|
|
* @return string
|
||
|
|
*/
|
||
|
|
public function getZone()
|
||
|
|
{
|
||
|
|
return $this->zone;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
// Adding a class alias for backwards compatibility with the previous class name.
|
||
|
|
class_alias(Locality::class, 'Google_Service_TrafficDirectorService_Locality');
|