123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401 |
- <?php
- # Generated by the protocol buffer compiler. DO NOT EDIT!
- # source: protos/ydb_cms.proto
- namespace Ydb\Cms;
- use Google\Protobuf\Internal\GPBType;
- use Google\Protobuf\Internal\RepeatedField;
- use Google\Protobuf\Internal\GPBUtil;
- /**
- * Generated from protobuf message <code>Ydb.Cms.GetDatabaseStatusResult</code>
- */
- class GetDatabaseStatusResult extends \Google\Protobuf\Internal\Message
- {
- /**
- * Full path to database's home dir.
- *
- * Generated from protobuf field <code>string path = 1;</code>
- */
- protected $path = '';
- /**
- * Current database state.
- *
- * Generated from protobuf field <code>.Ydb.Cms.GetDatabaseStatusResult.State state = 2;</code>
- */
- protected $state = 0;
- /**
- * Database resources allocated by CMS.
- *
- * Generated from protobuf field <code>.Ydb.Cms.Resources allocated_resources = 4;</code>
- */
- protected $allocated_resources = null;
- /**
- * Externally allocated database resources registered in CMS.
- *
- * Generated from protobuf field <code>repeated .Ydb.Cms.AllocatedComputationalUnit registered_resources = 5;</code>
- */
- private $registered_resources;
- /**
- * Current database generation. Incremented at each successful
- * alter request.
- *
- * Generated from protobuf field <code>uint64 generation = 6;</code>
- */
- protected $generation = 0;
- /**
- * Current quotas for schema operations
- *
- * Generated from protobuf field <code>.Ydb.Cms.SchemaOperationQuotas schema_operation_quotas = 9;</code>
- */
- protected $schema_operation_quotas = null;
- /**
- * Current quotas for the database
- *
- * Generated from protobuf field <code>.Ydb.Cms.DatabaseQuotas database_quotas = 10;</code>
- */
- protected $database_quotas = null;
- protected $resources_kind;
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $path
- * Full path to database's home dir.
- * @type int $state
- * Current database state.
- * @type \Ydb\Cms\Resources $required_resources
- * Database resources requested for allocation.
- * @type \Ydb\Cms\Resources $required_shared_resources
- * @type \Ydb\Cms\ServerlessResources $serverless_resources
- * @type \Ydb\Cms\Resources $allocated_resources
- * Database resources allocated by CMS.
- * @type array<\Ydb\Cms\AllocatedComputationalUnit>|\Google\Protobuf\Internal\RepeatedField $registered_resources
- * Externally allocated database resources registered in CMS.
- * @type int|string $generation
- * Current database generation. Incremented at each successful
- * alter request.
- * @type \Ydb\Cms\SchemaOperationQuotas $schema_operation_quotas
- * Current quotas for schema operations
- * @type \Ydb\Cms\DatabaseQuotas $database_quotas
- * Current quotas for the database
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Protos\YdbCms::initOnce();
- parent::__construct($data);
- }
- /**
- * Full path to database's home dir.
- *
- * Generated from protobuf field <code>string path = 1;</code>
- * @return string
- */
- public function getPath()
- {
- return $this->path;
- }
- /**
- * Full path to database's home dir.
- *
- * Generated from protobuf field <code>string path = 1;</code>
- * @param string $var
- * @return $this
- */
- public function setPath($var)
- {
- GPBUtil::checkString($var, True);
- $this->path = $var;
- return $this;
- }
- /**
- * Current database state.
- *
- * Generated from protobuf field <code>.Ydb.Cms.GetDatabaseStatusResult.State state = 2;</code>
- * @return int
- */
- public function getState()
- {
- return $this->state;
- }
- /**
- * Current database state.
- *
- * Generated from protobuf field <code>.Ydb.Cms.GetDatabaseStatusResult.State state = 2;</code>
- * @param int $var
- * @return $this
- */
- public function setState($var)
- {
- GPBUtil::checkEnum($var, \Ydb\Cms\GetDatabaseStatusResult\State::class);
- $this->state = $var;
- return $this;
- }
- /**
- * Database resources requested for allocation.
- *
- * Generated from protobuf field <code>.Ydb.Cms.Resources required_resources = 3;</code>
- * @return \Ydb\Cms\Resources|null
- */
- public function getRequiredResources()
- {
- return $this->readOneof(3);
- }
- public function hasRequiredResources()
- {
- return $this->hasOneof(3);
- }
- /**
- * Database resources requested for allocation.
- *
- * Generated from protobuf field <code>.Ydb.Cms.Resources required_resources = 3;</code>
- * @param \Ydb\Cms\Resources $var
- * @return $this
- */
- public function setRequiredResources($var)
- {
- GPBUtil::checkMessage($var, \Ydb\Cms\Resources::class);
- $this->writeOneof(3, $var);
- return $this;
- }
- /**
- * Generated from protobuf field <code>.Ydb.Cms.Resources required_shared_resources = 7;</code>
- * @return \Ydb\Cms\Resources|null
- */
- public function getRequiredSharedResources()
- {
- return $this->readOneof(7);
- }
- public function hasRequiredSharedResources()
- {
- return $this->hasOneof(7);
- }
- /**
- * Generated from protobuf field <code>.Ydb.Cms.Resources required_shared_resources = 7;</code>
- * @param \Ydb\Cms\Resources $var
- * @return $this
- */
- public function setRequiredSharedResources($var)
- {
- GPBUtil::checkMessage($var, \Ydb\Cms\Resources::class);
- $this->writeOneof(7, $var);
- return $this;
- }
- /**
- * Generated from protobuf field <code>.Ydb.Cms.ServerlessResources serverless_resources = 8;</code>
- * @return \Ydb\Cms\ServerlessResources|null
- */
- public function getServerlessResources()
- {
- return $this->readOneof(8);
- }
- public function hasServerlessResources()
- {
- return $this->hasOneof(8);
- }
- /**
- * Generated from protobuf field <code>.Ydb.Cms.ServerlessResources serverless_resources = 8;</code>
- * @param \Ydb\Cms\ServerlessResources $var
- * @return $this
- */
- public function setServerlessResources($var)
- {
- GPBUtil::checkMessage($var, \Ydb\Cms\ServerlessResources::class);
- $this->writeOneof(8, $var);
- return $this;
- }
- /**
- * Database resources allocated by CMS.
- *
- * Generated from protobuf field <code>.Ydb.Cms.Resources allocated_resources = 4;</code>
- * @return \Ydb\Cms\Resources|null
- */
- public function getAllocatedResources()
- {
- return $this->allocated_resources;
- }
- public function hasAllocatedResources()
- {
- return isset($this->allocated_resources);
- }
- public function clearAllocatedResources()
- {
- unset($this->allocated_resources);
- }
- /**
- * Database resources allocated by CMS.
- *
- * Generated from protobuf field <code>.Ydb.Cms.Resources allocated_resources = 4;</code>
- * @param \Ydb\Cms\Resources $var
- * @return $this
- */
- public function setAllocatedResources($var)
- {
- GPBUtil::checkMessage($var, \Ydb\Cms\Resources::class);
- $this->allocated_resources = $var;
- return $this;
- }
- /**
- * Externally allocated database resources registered in CMS.
- *
- * Generated from protobuf field <code>repeated .Ydb.Cms.AllocatedComputationalUnit registered_resources = 5;</code>
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getRegisteredResources()
- {
- return $this->registered_resources;
- }
- /**
- * Externally allocated database resources registered in CMS.
- *
- * Generated from protobuf field <code>repeated .Ydb.Cms.AllocatedComputationalUnit registered_resources = 5;</code>
- * @param array<\Ydb\Cms\AllocatedComputationalUnit>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setRegisteredResources($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Ydb\Cms\AllocatedComputationalUnit::class);
- $this->registered_resources = $arr;
- return $this;
- }
- /**
- * Current database generation. Incremented at each successful
- * alter request.
- *
- * Generated from protobuf field <code>uint64 generation = 6;</code>
- * @return int|string
- */
- public function getGeneration()
- {
- return $this->generation;
- }
- /**
- * Current database generation. Incremented at each successful
- * alter request.
- *
- * Generated from protobuf field <code>uint64 generation = 6;</code>
- * @param int|string $var
- * @return $this
- */
- public function setGeneration($var)
- {
- GPBUtil::checkUint64($var);
- $this->generation = $var;
- return $this;
- }
- /**
- * Current quotas for schema operations
- *
- * Generated from protobuf field <code>.Ydb.Cms.SchemaOperationQuotas schema_operation_quotas = 9;</code>
- * @return \Ydb\Cms\SchemaOperationQuotas|null
- */
- public function getSchemaOperationQuotas()
- {
- return $this->schema_operation_quotas;
- }
- public function hasSchemaOperationQuotas()
- {
- return isset($this->schema_operation_quotas);
- }
- public function clearSchemaOperationQuotas()
- {
- unset($this->schema_operation_quotas);
- }
- /**
- * Current quotas for schema operations
- *
- * Generated from protobuf field <code>.Ydb.Cms.SchemaOperationQuotas schema_operation_quotas = 9;</code>
- * @param \Ydb\Cms\SchemaOperationQuotas $var
- * @return $this
- */
- public function setSchemaOperationQuotas($var)
- {
- GPBUtil::checkMessage($var, \Ydb\Cms\SchemaOperationQuotas::class);
- $this->schema_operation_quotas = $var;
- return $this;
- }
- /**
- * Current quotas for the database
- *
- * Generated from protobuf field <code>.Ydb.Cms.DatabaseQuotas database_quotas = 10;</code>
- * @return \Ydb\Cms\DatabaseQuotas|null
- */
- public function getDatabaseQuotas()
- {
- return $this->database_quotas;
- }
- public function hasDatabaseQuotas()
- {
- return isset($this->database_quotas);
- }
- public function clearDatabaseQuotas()
- {
- unset($this->database_quotas);
- }
- /**
- * Current quotas for the database
- *
- * Generated from protobuf field <code>.Ydb.Cms.DatabaseQuotas database_quotas = 10;</code>
- * @param \Ydb\Cms\DatabaseQuotas $var
- * @return $this
- */
- public function setDatabaseQuotas($var)
- {
- GPBUtil::checkMessage($var, \Ydb\Cms\DatabaseQuotas::class);
- $this->database_quotas = $var;
- return $this;
- }
- /**
- * @return string
- */
- public function getResourcesKind()
- {
- return $this->whichOneof("resources_kind");
- }
- }
|