Created
February 15, 2024 13:04
-
-
Save ksn135/4b03fc2c04d2a7ae515719fbd14fd7ef to your computer and use it in GitHub Desktop.
Protobuf examples
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# Generated by the protocol buffer compiler. DO NOT EDIT! | |
# source: Organization.proto | |
namespace AppBundle\Diadoc\Api\Proto; | |
use Google\Protobuf\Internal\GPBType; | |
use Google\Protobuf\Internal\RepeatedField; | |
use Google\Protobuf\Internal\GPBUtil; | |
/** | |
* Generated from protobuf message <code>AppBundle.Diadoc.Api.Proto.Organization</code> | |
*/ | |
class Organization extends \Google\Protobuf\Internal\Message | |
{ | |
/** | |
* Generated from protobuf field <code>string OrgId = 1;</code> | |
*/ | |
protected $OrgId = ''; | |
/** | |
* Generated from protobuf field <code>string Inn = 2;</code> | |
*/ | |
protected $Inn = ''; | |
/** | |
* Generated from protobuf field <code>string Kpp = 3;</code> | |
*/ | |
protected $Kpp = ''; | |
/** | |
* Generated from protobuf field <code>string FullName = 4;</code> | |
*/ | |
protected $FullName = ''; | |
/** | |
* Generated from protobuf field <code>string ShortName = 5;</code> | |
*/ | |
protected $ShortName = ''; | |
/** | |
* Generated from protobuf field <code>repeated .AppBundle.Diadoc.Api.Proto.Box Boxes = 7;</code> | |
*/ | |
private $Boxes; | |
/** | |
* Generated from protobuf field <code>string Ogrn = 8;</code> | |
*/ | |
protected $Ogrn = ''; | |
/** | |
* Generated from protobuf field <code>string FnsParticipantId = 9;</code> | |
*/ | |
protected $FnsParticipantId = ''; | |
/** | |
* Generated from protobuf field <code>.AppBundle.Diadoc.Api.Proto.Address Address = 10;</code> | |
*/ | |
protected $Address = null; | |
/** | |
* Generated from protobuf field <code>string FnsRegistrationDate = 11;</code> | |
*/ | |
protected $FnsRegistrationDate = ''; | |
/** | |
* Generated from protobuf field <code>repeated .AppBundle.Diadoc.Api.Proto.Department Departments = 12;</code> | |
*/ | |
private $Departments; | |
/** | |
* Generated from protobuf field <code>string IfnsCode = 13;</code> | |
*/ | |
protected $IfnsCode = ''; | |
/** | |
* Generated from protobuf field <code>bool IsPilot = 14;</code> | |
*/ | |
protected $IsPilot = false; | |
/** | |
* Generated from protobuf field <code>bool IsActive = 15;</code> | |
*/ | |
protected $IsActive = false; | |
/** | |
* Generated from protobuf field <code>bool IsTest = 16;</code> | |
*/ | |
protected $IsTest = false; | |
/** | |
* Generated from protobuf field <code>bool IsBranch = 17;</code> | |
*/ | |
protected $IsBranch = false; | |
/** | |
* Generated from protobuf field <code>bool IsRoaming = 18;</code> | |
*/ | |
protected $IsRoaming = false; | |
/** | |
* Generated from protobuf field <code>bool IsEmployee = 19;</code> | |
*/ | |
protected $IsEmployee = false; | |
/** | |
* Generated from protobuf field <code>int32 InvitationCount = 20;</code> | |
*/ | |
protected $InvitationCount = 0; | |
/** | |
* Generated from protobuf field <code>int32 SearchCount = 21;</code> | |
*/ | |
protected $SearchCount = 0; | |
/** | |
* Generated from protobuf field <code>.AppBundle.Diadoc.Api.Proto.Sociability Sociability = 22;</code> | |
*/ | |
protected $Sociability = 0; | |
/** | |
* Generated from protobuf field <code>string LiquidationDate = 23;</code> | |
*/ | |
protected $LiquidationDate = ''; | |
/** | |
* Generated from protobuf field <code>string CertificateOfRegistryInfo = 24;</code> | |
*/ | |
protected $CertificateOfRegistryInfo = ''; | |
/** | |
* Generated from protobuf field <code>bool IsForeign = 25;</code> | |
*/ | |
protected $IsForeign = false; | |
/** | |
* Generated from protobuf field <code>bool HasCertificateToSign = 26;</code> | |
*/ | |
protected $HasCertificateToSign = false; | |
/** | |
* Constructor. | |
* | |
* @param array $data { | |
* Optional. Data for populating the Message object. | |
* | |
* @type string $OrgId | |
* @type string $Inn | |
* @type string $Kpp | |
* @type string $FullName | |
* @type string $ShortName | |
* @type \AppBundle\Diadoc\Api\Proto\Box[]|\Google\Protobuf\Internal\RepeatedField $Boxes | |
* @type string $Ogrn | |
* @type string $FnsParticipantId | |
* @type \AppBundle\Diadoc\Api\Proto\Address $Address | |
* @type string $FnsRegistrationDate | |
* @type \AppBundle\Diadoc\Api\Proto\Department[]|\Google\Protobuf\Internal\RepeatedField $Departments | |
* @type string $IfnsCode | |
* @type bool $IsPilot | |
* @type bool $IsActive | |
* @type bool $IsTest | |
* @type bool $IsBranch | |
* @type bool $IsRoaming | |
* @type bool $IsEmployee | |
* @type int $InvitationCount | |
* @type int $SearchCount | |
* @type int $Sociability | |
* @type string $LiquidationDate | |
* @type string $CertificateOfRegistryInfo | |
* @type bool $IsForeign | |
* @type bool $HasCertificateToSign | |
* } | |
*/ | |
public function __construct($data = null) | |
{ | |
\GPBMetadata\Organization::initOnce(); | |
parent::__construct($data); | |
} | |
/** | |
* Generated from protobuf field <code>string OrgId = 1;</code> | |
* @return string | |
*/ | |
public function getOrgId() | |
{ | |
return $this->OrgId; | |
} | |
/** | |
* Generated from protobuf field <code>string OrgId = 1;</code> | |
* @param string $var | |
* @return $this | |
*/ | |
public function setOrgId($var) | |
{ | |
GPBUtil::checkString($var, true); | |
$this->OrgId = $var; | |
return $this; | |
} | |
/** | |
* Generated from protobuf field <code>string Inn = 2;</code> | |
* @return string | |
*/ | |
public function getInn() | |
{ | |
return $this->Inn; | |
} | |
/** | |
* Generated from protobuf field <code>string Inn = 2;</code> | |
* @param string $var | |
* @return $this | |
*/ | |
public function setInn($var) | |
{ | |
GPBUtil::checkString($var, true); | |
$this->Inn = $var; | |
return $this; | |
} | |
/** | |
* Generated from protobuf field <code>string Kpp = 3;</code> | |
* @return string | |
*/ | |
public function getKpp() | |
{ | |
return $this->Kpp; | |
} | |
/** | |
* Generated from protobuf field <code>string Kpp = 3;</code> | |
* @param string $var | |
* @return $this | |
*/ | |
public function setKpp($var) | |
{ | |
GPBUtil::checkString($var, true); | |
$this->Kpp = $var; | |
return $this; | |
} | |
/** | |
* Generated from protobuf field <code>string FullName = 4;</code> | |
* @return string | |
*/ | |
public function getFullName() | |
{ | |
return $this->FullName; | |
} | |
/** | |
* Generated from protobuf field <code>string FullName = 4;</code> | |
* @param string $var | |
* @return $this | |
*/ | |
public function setFullName($var) | |
{ | |
GPBUtil::checkString($var, true); | |
$this->FullName = $var; | |
return $this; | |
} | |
/** | |
* Generated from protobuf field <code>string ShortName = 5;</code> | |
* @return string | |
*/ | |
public function getShortName() | |
{ | |
return $this->ShortName; | |
} | |
/** | |
* Generated from protobuf field <code>string ShortName = 5;</code> | |
* @param string $var | |
* @return $this | |
*/ | |
public function setShortName($var) | |
{ | |
GPBUtil::checkString($var, true); | |
$this->ShortName = $var; | |
return $this; | |
} | |
/** | |
* Generated from protobuf field <code>repeated .AppBundle.Diadoc.Api.Proto.Box Boxes = 7;</code> | |
* @return \Google\Protobuf\Internal\RepeatedField | |
*/ | |
public function getBoxes() | |
{ | |
return $this->Boxes; | |
} | |
/** | |
* Generated from protobuf field <code>repeated .AppBundle.Diadoc.Api.Proto.Box Boxes = 7;</code> | |
* @param \AppBundle\Diadoc\Api\Proto\Box[]|\Google\Protobuf\Internal\RepeatedField $var | |
* @return $this | |
*/ | |
public function setBoxes($var) | |
{ | |
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \AppBundle\Diadoc\Api\Proto\Box::class); | |
$this->Boxes = $arr; | |
return $this; | |
} | |
/** | |
* Generated from protobuf field <code>string Ogrn = 8;</code> | |
* @return string | |
*/ | |
public function getOgrn() | |
{ | |
return $this->Ogrn; | |
} | |
/** | |
* Generated from protobuf field <code>string Ogrn = 8;</code> | |
* @param string $var | |
* @return $this | |
*/ | |
public function setOgrn($var) | |
{ | |
GPBUtil::checkString($var, true); | |
$this->Ogrn = $var; | |
return $this; | |
} | |
/** | |
* Generated from protobuf field <code>string FnsParticipantId = 9;</code> | |
* @return string | |
*/ | |
public function getFnsParticipantId() | |
{ | |
return $this->FnsParticipantId; | |
} | |
/** | |
* Generated from protobuf field <code>string FnsParticipantId = 9;</code> | |
* @param string $var | |
* @return $this | |
*/ | |
public function setFnsParticipantId($var) | |
{ | |
GPBUtil::checkString($var, true); | |
$this->FnsParticipantId = $var; | |
return $this; | |
} | |
/** | |
* Generated from protobuf field <code>.AppBundle.Diadoc.Api.Proto.Address Address = 10;</code> | |
* @return \AppBundle\Diadoc\Api\Proto\Address|null | |
*/ | |
public function getAddress() | |
{ | |
return isset($this->Address) ? $this->Address : null; | |
} | |
public function hasAddress() | |
{ | |
return isset($this->Address); | |
} | |
public function clearAddress() | |
{ | |
unset($this->Address); | |
} | |
/** | |
* Generated from protobuf field <code>.AppBundle.Diadoc.Api.Proto.Address Address = 10;</code> | |
* @param \AppBundle\Diadoc\Api\Proto\Address $var | |
* @return $this | |
*/ | |
public function setAddress($var) | |
{ | |
GPBUtil::checkMessage($var, \AppBundle\Diadoc\Api\Proto\Address::class); | |
$this->Address = $var; | |
return $this; | |
} | |
/** | |
* Generated from protobuf field <code>string FnsRegistrationDate = 11;</code> | |
* @return string | |
*/ | |
public function getFnsRegistrationDate() | |
{ | |
return $this->FnsRegistrationDate; | |
} | |
/** | |
* Generated from protobuf field <code>string FnsRegistrationDate = 11;</code> | |
* @param string $var | |
* @return $this | |
*/ | |
public function setFnsRegistrationDate($var) | |
{ | |
GPBUtil::checkString($var, true); | |
$this->FnsRegistrationDate = $var; | |
return $this; | |
} | |
/** | |
* Generated from protobuf field <code>repeated .AppBundle.Diadoc.Api.Proto.Department Departments = 12;</code> | |
* @return \Google\Protobuf\Internal\RepeatedField | |
*/ | |
public function getDepartments() | |
{ | |
return $this->Departments; | |
} | |
/** | |
* Generated from protobuf field <code>repeated .AppBundle.Diadoc.Api.Proto.Department Departments = 12;</code> | |
* @param \AppBundle\Diadoc\Api\Proto\Department[]|\Google\Protobuf\Internal\RepeatedField $var | |
* @return $this | |
*/ | |
public function setDepartments($var) | |
{ | |
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \AppBundle\Diadoc\Api\Proto\Department::class); | |
$this->Departments = $arr; | |
return $this; | |
} | |
/** | |
* Generated from protobuf field <code>string IfnsCode = 13;</code> | |
* @return string | |
*/ | |
public function getIfnsCode() | |
{ | |
return $this->IfnsCode; | |
} | |
/** | |
* Generated from protobuf field <code>string IfnsCode = 13;</code> | |
* @param string $var | |
* @return $this | |
*/ | |
public function setIfnsCode($var) | |
{ | |
GPBUtil::checkString($var, true); | |
$this->IfnsCode = $var; | |
return $this; | |
} | |
/** | |
* Generated from protobuf field <code>bool IsPilot = 14;</code> | |
* @return bool | |
*/ | |
public function getIsPilot() | |
{ | |
return $this->IsPilot; | |
} | |
/** | |
* Generated from protobuf field <code>bool IsPilot = 14;</code> | |
* @param bool $var | |
* @return $this | |
*/ | |
public function setIsPilot($var) | |
{ | |
GPBUtil::checkBool($var); | |
$this->IsPilot = $var; | |
return $this; | |
} | |
/** | |
* Generated from protobuf field <code>bool IsActive = 15;</code> | |
* @return bool | |
*/ | |
public function getIsActive() | |
{ | |
return $this->IsActive; | |
} | |
/** | |
* Generated from protobuf field <code>bool IsActive = 15;</code> | |
* @param bool $var | |
* @return $this | |
*/ | |
public function setIsActive($var) | |
{ | |
GPBUtil::checkBool($var); | |
$this->IsActive = $var; | |
return $this; | |
} | |
/** | |
* Generated from protobuf field <code>bool IsTest = 16;</code> | |
* @return bool | |
*/ | |
public function getIsTest() | |
{ | |
return $this->IsTest; | |
} | |
/** | |
* Generated from protobuf field <code>bool IsTest = 16;</code> | |
* @param bool $var | |
* @return $this | |
*/ | |
public function setIsTest($var) | |
{ | |
GPBUtil::checkBool($var); | |
$this->IsTest = $var; | |
return $this; | |
} | |
/** | |
* Generated from protobuf field <code>bool IsBranch = 17;</code> | |
* @return bool | |
*/ | |
public function getIsBranch() | |
{ | |
return $this->IsBranch; | |
} | |
/** | |
* Generated from protobuf field <code>bool IsBranch = 17;</code> | |
* @param bool $var | |
* @return $this | |
*/ | |
public function setIsBranch($var) | |
{ | |
GPBUtil::checkBool($var); | |
$this->IsBranch = $var; | |
return $this; | |
} | |
/** | |
* Generated from protobuf field <code>bool IsRoaming = 18;</code> | |
* @return bool | |
*/ | |
public function getIsRoaming() | |
{ | |
return $this->IsRoaming; | |
} | |
/** | |
* Generated from protobuf field <code>bool IsRoaming = 18;</code> | |
* @param bool $var | |
* @return $this | |
*/ | |
public function setIsRoaming($var) | |
{ | |
GPBUtil::checkBool($var); | |
$this->IsRoaming = $var; | |
return $this; | |
} | |
/** | |
* Generated from protobuf field <code>bool IsEmployee = 19;</code> | |
* @return bool | |
*/ | |
public function getIsEmployee() | |
{ | |
return $this->IsEmployee; | |
} | |
/** | |
* Generated from protobuf field <code>bool IsEmployee = 19;</code> | |
* @param bool $var | |
* @return $this | |
*/ | |
public function setIsEmployee($var) | |
{ | |
GPBUtil::checkBool($var); | |
$this->IsEmployee = $var; | |
return $this; | |
} | |
/** | |
* Generated from protobuf field <code>int32 InvitationCount = 20;</code> | |
* @return int | |
*/ | |
public function getInvitationCount() | |
{ | |
return $this->InvitationCount; | |
} | |
/** | |
* Generated from protobuf field <code>int32 InvitationCount = 20;</code> | |
* @param int $var | |
* @return $this | |
*/ | |
public function setInvitationCount($var) | |
{ | |
GPBUtil::checkInt32($var); | |
$this->InvitationCount = $var; | |
return $this; | |
} | |
/** | |
* Generated from protobuf field <code>int32 SearchCount = 21;</code> | |
* @return int | |
*/ | |
public function getSearchCount() | |
{ | |
return $this->SearchCount; | |
} | |
/** | |
* Generated from protobuf field <code>int32 SearchCount = 21;</code> | |
* @param int $var | |
* @return $this | |
*/ | |
public function setSearchCount($var) | |
{ | |
GPBUtil::checkInt32($var); | |
$this->SearchCount = $var; | |
return $this; | |
} | |
/** | |
* Generated from protobuf field <code>.AppBundle.Diadoc.Api.Proto.Sociability Sociability = 22;</code> | |
* @return int | |
*/ | |
public function getSociability() | |
{ | |
return $this->Sociability; | |
} | |
/** | |
* Generated from protobuf field <code>.AppBundle.Diadoc.Api.Proto.Sociability Sociability = 22;</code> | |
* @param int $var | |
* @return $this | |
*/ | |
public function setSociability($var) | |
{ | |
GPBUtil::checkEnum($var, \AppBundle\Diadoc\Api\Proto\Sociability::class); | |
$this->Sociability = $var; | |
return $this; | |
} | |
/** | |
* Generated from protobuf field <code>string LiquidationDate = 23;</code> | |
* @return string | |
*/ | |
public function getLiquidationDate() | |
{ | |
return $this->LiquidationDate; | |
} | |
/** | |
* Generated from protobuf field <code>string LiquidationDate = 23;</code> | |
* @param string $var | |
* @return $this | |
*/ | |
public function setLiquidationDate($var) | |
{ | |
GPBUtil::checkString($var, true); | |
$this->LiquidationDate = $var; | |
return $this; | |
} | |
/** | |
* Generated from protobuf field <code>string CertificateOfRegistryInfo = 24;</code> | |
* @return string | |
*/ | |
public function getCertificateOfRegistryInfo() | |
{ | |
return $this->CertificateOfRegistryInfo; | |
} | |
/** | |
* Generated from protobuf field <code>string CertificateOfRegistryInfo = 24;</code> | |
* @param string $var | |
* @return $this | |
*/ | |
public function setCertificateOfRegistryInfo($var) | |
{ | |
GPBUtil::checkString($var, true); | |
$this->CertificateOfRegistryInfo = $var; | |
return $this; | |
} | |
/** | |
* Generated from protobuf field <code>bool IsForeign = 25;</code> | |
* @return bool | |
*/ | |
public function getIsForeign() | |
{ | |
return $this->IsForeign; | |
} | |
/** | |
* Generated from protobuf field <code>bool IsForeign = 25;</code> | |
* @param bool $var | |
* @return $this | |
*/ | |
public function setIsForeign($var) | |
{ | |
GPBUtil::checkBool($var); | |
$this->IsForeign = $var; | |
return $this; | |
} | |
/** | |
* Generated from protobuf field <code>bool HasCertificateToSign = 26;</code> | |
* @return bool | |
*/ | |
public function getHasCertificateToSign() | |
{ | |
return $this->HasCertificateToSign; | |
} | |
/** | |
* Generated from protobuf field <code>bool HasCertificateToSign = 26;</code> | |
* @param bool $var | |
* @return $this | |
*/ | |
public function setHasCertificateToSign($var) | |
{ | |
GPBUtil::checkBool($var); | |
$this->HasCertificateToSign = $var; | |
return $this; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax = "proto3"; | |
import "Address.proto"; | |
package AppBundle.Diadoc.Api.Proto; | |
message OrganizationList { | |
repeated Organization Organizations = 1; | |
} | |
message Organization { | |
string OrgId = 1; | |
string Inn = 2; | |
string Kpp = 3; | |
string FullName = 4; | |
string ShortName = 5; | |
repeated Box Boxes = 7; | |
string Ogrn = 8; | |
string FnsParticipantId = 9; | |
Address Address = 10; | |
string FnsRegistrationDate = 11; | |
repeated Department Departments = 12; | |
string IfnsCode = 13; | |
bool IsPilot = 14; | |
bool IsActive = 15; | |
bool IsTest = 16; | |
bool IsBranch = 17; | |
bool IsRoaming = 18; | |
bool IsEmployee = 19; | |
int32 InvitationCount = 20; | |
int32 SearchCount = 21; | |
Sociability Sociability = 22; | |
string LiquidationDate = 23; | |
string CertificateOfRegistryInfo = 24; | |
bool IsForeign = 25; | |
bool HasCertificateToSign = 26; | |
} | |
message Department { | |
string DepartmentId = 1; | |
string ParentDepartmentId = 2; | |
string Name = 3; | |
string Abbreviation = 4; | |
string Kpp = 5; | |
Address Address = 6; | |
bool IsDisabled = 7; // [default = false]; | |
} | |
enum OrganizationInvoiceFormatVersion { | |
v5_00 = 0; | |
v5_01 = 1; | |
v5_02 = 2; | |
} | |
message Box { | |
string BoxId = 1; | |
string BoxIdGuid = 6; | |
string Title = 2; | |
Organization Organization = 3; | |
OrganizationInvoiceFormatVersion InvoiceFormatVersion = 4; // [default = v5_02]; | |
bool EncryptedDocumentsAllowed = 5; | |
} | |
enum Sociability { | |
AllOrganizations = 0; | |
CounteragentsOnly = 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment