├── CODEOWNERS
├── LICENSE
├── README.md
├── composer.json
├── examples
├── .env.example
├── .gitignore
├── Dockerfile
├── README.md
├── app
│ ├── AppService.php
│ └── Commands
│ │ ├── BasicExampleCommand.php
│ │ ├── CreateTableCommand.php
│ │ ├── ListDirectoryCommand.php
│ │ ├── ListEndpointsCommand.php
│ │ ├── MakeDirectoryCommand.php
│ │ ├── ReadTableCommand.php
│ │ ├── RemoveDirectoryCommand.php
│ │ ├── Select1Command.php
│ │ ├── SelectCommand.php
│ │ └── WhoAmICommand.php
├── application.php
├── composer.json
├── console
├── docker-compose.yml
└── logs
│ └── .gitignore
├── protos
├── GPBMetadata
│ ├── Protos
│ │ ├── Annotations
│ │ │ └── Validation.php
│ │ ├── YdbAuth.php
│ │ ├── YdbCms.php
│ │ ├── YdbCommon.php
│ │ ├── YdbCoordination.php
│ │ ├── YdbDiscovery.php
│ │ ├── YdbExport.php
│ │ ├── YdbFormats.php
│ │ ├── YdbImport.php
│ │ ├── YdbIssueMessage.php
│ │ ├── YdbMonitoring.php
│ │ ├── YdbOperation.php
│ │ ├── YdbQueryStats.php
│ │ ├── YdbRateLimiter.php
│ │ ├── YdbScheme.php
│ │ ├── YdbScripting.php
│ │ ├── YdbStatusCodes.php
│ │ ├── YdbTable.php
│ │ ├── YdbTopic.php
│ │ └── YdbValue.php
│ ├── YdbAuthV1.php
│ ├── YdbCmsV1.php
│ ├── YdbCoordinationV1.php
│ ├── YdbDiscoveryV1.php
│ ├── YdbExportV1.php
│ ├── YdbImportV1.php
│ ├── YdbMonitoringV1.php
│ ├── YdbOperationV1.php
│ ├── YdbRateLimiterV1.php
│ ├── YdbSchemeV1.php
│ ├── YdbScriptingV1.php
│ ├── YdbTableV1.php
│ └── YdbTopicV1.php
└── Ydb
│ ├── Auth
│ ├── LoginRequest.php
│ ├── LoginResponse.php
│ ├── LoginResult.php
│ └── V1
│ │ └── AuthServiceClient.php
│ ├── Cms
│ ├── AllocatedComputationalUnit.php
│ ├── AlterDatabaseRequest.php
│ ├── AlterDatabaseResponse.php
│ ├── AvailabilityZoneDescription.php
│ ├── ComputationalUnitDescription.php
│ ├── ComputationalUnits.php
│ ├── CreateDatabaseRequest.php
│ ├── CreateDatabaseResponse.php
│ ├── DatabaseOptions.php
│ ├── DatabaseQuotas.php
│ ├── DescribeDatabaseOptionsRequest.php
│ ├── DescribeDatabaseOptionsResponse.php
│ ├── DescribeDatabaseOptionsResult.php
│ ├── GetDatabaseStatusRequest.php
│ ├── GetDatabaseStatusResponse.php
│ ├── GetDatabaseStatusResult.php
│ ├── GetDatabaseStatusResult
│ │ └── State.php
│ ├── ListDatabasesRequest.php
│ ├── ListDatabasesResponse.php
│ ├── ListDatabasesResult.php
│ ├── RemoveDatabaseRequest.php
│ ├── RemoveDatabaseResponse.php
│ ├── Resources.php
│ ├── SchemaOperationQuotas.php
│ ├── SchemaOperationQuotas
│ │ └── LeakyBucket.php
│ ├── ServerlessResources.php
│ ├── StorageUnitDescription.php
│ ├── StorageUnits.php
│ └── V1
│ │ └── CmsServiceClient.php
│ ├── Column.php
│ ├── Coordination
│ ├── AlterNodeRequest.php
│ ├── AlterNodeResponse.php
│ ├── Config.php
│ ├── ConsistencyMode.php
│ ├── CreateNodeRequest.php
│ ├── CreateNodeResponse.php
│ ├── DescribeNodeRequest.php
│ ├── DescribeNodeResponse.php
│ ├── DescribeNodeResult.php
│ ├── DropNodeRequest.php
│ ├── DropNodeResponse.php
│ ├── RateLimiterCountersMode.php
│ ├── SemaphoreDescription.php
│ ├── SemaphoreSession.php
│ ├── SessionDescription.php
│ ├── SessionRequest.php
│ ├── SessionRequest
│ │ ├── AcquireSemaphore.php
│ │ ├── CreateSemaphore.php
│ │ ├── DeleteSemaphore.php
│ │ ├── DescribeSemaphore.php
│ │ ├── PingPong.php
│ │ ├── ReleaseSemaphore.php
│ │ ├── SessionStart.php
│ │ ├── SessionStop.php
│ │ └── UpdateSemaphore.php
│ ├── SessionResponse.php
│ ├── SessionResponse
│ │ ├── AcquireSemaphorePending.php
│ │ ├── AcquireSemaphoreResult.php
│ │ ├── CreateSemaphoreResult.php
│ │ ├── DeleteSemaphoreResult.php
│ │ ├── DescribeSemaphoreChanged.php
│ │ ├── DescribeSemaphoreResult.php
│ │ ├── Failure.php
│ │ ├── PingPong.php
│ │ ├── ReleaseSemaphoreResult.php
│ │ ├── SessionStarted.php
│ │ ├── SessionStopped.php
│ │ └── UpdateSemaphoreResult.php
│ ├── Unsupported.php
│ └── V1
│ │ └── CoordinationServiceClient.php
│ ├── CostInfo.php
│ ├── DecimalType.php
│ ├── DictType.php
│ ├── Discovery
│ ├── EndpointInfo.php
│ ├── ListEndpointsRequest.php
│ ├── ListEndpointsResponse.php
│ ├── ListEndpointsResult.php
│ ├── V1
│ │ └── DiscoveryServiceClient.php
│ ├── WhoAmIRequest.php
│ ├── WhoAmIResponse.php
│ └── WhoAmIResult.php
│ ├── Export
│ ├── ExportItemProgress.php
│ ├── ExportProgress.php
│ ├── ExportProgress
│ │ └── Progress.php
│ ├── ExportToS3Metadata.php
│ ├── ExportToS3Request.php
│ ├── ExportToS3Response.php
│ ├── ExportToS3Result.php
│ ├── ExportToS3Settings.php
│ ├── ExportToS3Settings
│ │ ├── Item.php
│ │ ├── Scheme.php
│ │ └── StorageClass.php
│ ├── ExportToYtMetadata.php
│ ├── ExportToYtRequest.php
│ ├── ExportToYtResponse.php
│ ├── ExportToYtResult.php
│ ├── ExportToYtSettings.php
│ ├── ExportToYtSettings
│ │ └── Item.php
│ └── V1
│ │ └── ExportServiceClient.php
│ ├── FeatureFlag.php
│ ├── FeatureFlag
│ └── Status.php
│ ├── Formats
│ ├── ArrowBatchSettings.php
│ └── CsvSettings.php
│ ├── Import
│ ├── ImportDataRequest.php
│ ├── ImportDataResponse.php
│ ├── ImportDataResult.php
│ ├── ImportFromS3Metadata.php
│ ├── ImportFromS3Request.php
│ ├── ImportFromS3Response.php
│ ├── ImportFromS3Result.php
│ ├── ImportFromS3Settings.php
│ ├── ImportFromS3Settings
│ │ ├── Item.php
│ │ └── Scheme.php
│ ├── ImportItemProgress.php
│ ├── ImportProgress.php
│ ├── ImportProgress
│ │ └── Progress.php
│ ├── V1
│ │ └── ImportServiceClient.php
│ └── YdbDumpFormat.php
│ ├── Issue
│ ├── IssueMessage.php
│ └── IssueMessage
│ │ └── Position.php
│ ├── Limit.php
│ ├── Limit
│ └── Range.php
│ ├── ListType.php
│ ├── MapKey.php
│ ├── Monitoring
│ ├── ComputeNodeStatus.php
│ ├── ComputeStatus.php
│ ├── ComputeTabletStatus.php
│ ├── DatabaseStatus.php
│ ├── IssueLog.php
│ ├── LoadAverageStatus.php
│ ├── Location.php
│ ├── LocationCompute.php
│ ├── LocationComputePool.php
│ ├── LocationComputeTablet.php
│ ├── LocationDatabase.php
│ ├── LocationNode.php
│ ├── LocationStorage.php
│ ├── LocationStorageGroup.php
│ ├── LocationStoragePDisk.php
│ ├── LocationStoragePool.php
│ ├── LocationStorageVDisk.php
│ ├── NodeCheckRequest.php
│ ├── NodeCheckResponse.php
│ ├── SelfCheck.php
│ ├── SelfCheck
│ │ └── Result.php
│ ├── SelfCheckRequest.php
│ ├── SelfCheckResponse.php
│ ├── SelfCheckResult.php
│ ├── StatusFlag.php
│ ├── StatusFlag
│ │ └── Status.php
│ ├── StorageGroupStatus.php
│ ├── StoragePDiskStatus.php
│ ├── StoragePoolStatus.php
│ ├── StorageStatus.php
│ ├── StorageVDiskStatus.php
│ ├── ThreadPoolStatus.php
│ └── V1
│ │ └── MonitoringServiceClient.php
│ ├── Operation
│ └── V1
│ │ └── OperationServiceClient.php
│ ├── Operations
│ ├── CancelOperationRequest.php
│ ├── CancelOperationResponse.php
│ ├── ForgetOperationRequest.php
│ ├── ForgetOperationResponse.php
│ ├── GetOperationRequest.php
│ ├── GetOperationResponse.php
│ ├── ListOperationsRequest.php
│ ├── ListOperationsResponse.php
│ ├── Operation.php
│ ├── OperationParams.php
│ └── OperationParams
│ │ └── OperationMode.php
│ ├── OptionalType.php
│ ├── PgType.php
│ ├── QuotaExceeded.php
│ ├── RateLimiter
│ ├── AcquireResourceRequest.php
│ ├── AcquireResourceResponse.php
│ ├── AcquireResourceResult.php
│ ├── AlterResourceRequest.php
│ ├── AlterResourceResponse.php
│ ├── AlterResourceResult.php
│ ├── CreateResourceRequest.php
│ ├── CreateResourceResponse.php
│ ├── CreateResourceResult.php
│ ├── DescribeResourceRequest.php
│ ├── DescribeResourceResponse.php
│ ├── DescribeResourceResult.php
│ ├── DropResourceRequest.php
│ ├── DropResourceResponse.php
│ ├── DropResourceResult.php
│ ├── HierarchicalDrrSettings.php
│ ├── ListResourcesRequest.php
│ ├── ListResourcesResponse.php
│ ├── ListResourcesResult.php
│ ├── Resource.php
│ └── V1
│ │ └── RateLimiterServiceClient.php
│ ├── ResultSet.php
│ ├── Scheme
│ ├── DescribePathRequest.php
│ ├── DescribePathResponse.php
│ ├── DescribePathResult.php
│ ├── Entry.php
│ ├── Entry
│ │ └── Type.php
│ ├── ListDirectoryRequest.php
│ ├── ListDirectoryResponse.php
│ ├── ListDirectoryResult.php
│ ├── MakeDirectoryRequest.php
│ ├── MakeDirectoryResponse.php
│ ├── ModifyPermissionsRequest.php
│ ├── ModifyPermissionsResponse.php
│ ├── Permissions.php
│ ├── PermissionsAction.php
│ ├── RemoveDirectoryRequest.php
│ ├── RemoveDirectoryResponse.php
│ └── V1
│ │ └── SchemeServiceClient.php
│ ├── Scripting
│ ├── ExecuteYqlPartialResponse.php
│ ├── ExecuteYqlPartialResult.php
│ ├── ExecuteYqlRequest.php
│ ├── ExecuteYqlResponse.php
│ ├── ExecuteYqlResult.php
│ ├── ExplainYqlRequest.php
│ ├── ExplainYqlRequest
│ │ └── Mode.php
│ ├── ExplainYqlResponse.php
│ ├── ExplainYqlResult.php
│ └── V1
│ │ └── ScriptingServiceClient.php
│ ├── StatusIds.php
│ ├── StatusIds
│ └── StatusCode.php
│ ├── StructMember.php
│ ├── StructType.php
│ ├── Table
│ ├── AlterTableRequest.php
│ ├── AlterTableResponse.php
│ ├── AzReadReplicasSettings.php
│ ├── BeginTransactionRequest.php
│ ├── BeginTransactionResponse.php
│ ├── BeginTransactionResult.php
│ ├── BulkUpsertRequest.php
│ ├── BulkUpsertResponse.php
│ ├── BulkUpsertResult.php
│ ├── CachingPolicy.php
│ ├── CachingPolicyDescription.php
│ ├── Changefeed.php
│ ├── ChangefeedDescription.php
│ ├── ChangefeedDescription
│ │ └── State.php
│ ├── ChangefeedFormat.php
│ ├── ChangefeedFormat
│ │ └── Format.php
│ ├── ChangefeedMode.php
│ ├── ChangefeedMode
│ │ └── Mode.php
│ ├── ClusterReplicasSettings.php
│ ├── ColumnFamily.php
│ ├── ColumnFamily
│ │ └── Compression.php
│ ├── ColumnFamilyPolicy.php
│ ├── ColumnFamilyPolicy
│ │ └── Compression.php
│ ├── ColumnMeta.php
│ ├── CommitTransactionRequest.php
│ ├── CommitTransactionResponse.php
│ ├── CommitTransactionResult.php
│ ├── CompactionPolicy.php
│ ├── CompactionPolicyDescription.php
│ ├── CopyTableItem.php
│ ├── CopyTableRequest.php
│ ├── CopyTableResponse.php
│ ├── CopyTablesRequest.php
│ ├── CopyTablesResponse.php
│ ├── CreateSessionRequest.php
│ ├── CreateSessionResponse.php
│ ├── CreateSessionResult.php
│ ├── CreateTableRequest.php
│ ├── CreateTableResponse.php
│ ├── DateTypeColumnModeSettings.php
│ ├── DeleteSessionRequest.php
│ ├── DeleteSessionResponse.php
│ ├── DescribeTableOptionsRequest.php
│ ├── DescribeTableOptionsResponse.php
│ ├── DescribeTableOptionsResult.php
│ ├── DescribeTableRequest.php
│ ├── DescribeTableResponse.php
│ ├── DescribeTableResult.php
│ ├── DropTableRequest.php
│ ├── DropTableResponse.php
│ ├── ExecuteDataQueryRequest.php
│ ├── ExecuteDataQueryResponse.php
│ ├── ExecuteQueryResult.php
│ ├── ExecuteScanQueryPartialResponse.php
│ ├── ExecuteScanQueryPartialResult.php
│ ├── ExecuteScanQueryRequest.php
│ ├── ExecuteScanQueryRequest
│ │ └── Mode.php
│ ├── ExecuteSchemeQueryRequest.php
│ ├── ExecuteSchemeQueryResponse.php
│ ├── ExecutionPolicy.php
│ ├── ExecutionPolicyDescription.php
│ ├── ExplainDataQueryRequest.php
│ ├── ExplainDataQueryResponse.php
│ ├── ExplainQueryResult.php
│ ├── ExplicitPartitions.php
│ ├── GlobalAsyncIndex.php
│ ├── GlobalIndex.php
│ ├── IndexBuildDescription.php
│ ├── IndexBuildMetadata.php
│ ├── IndexBuildState.php
│ ├── IndexBuildState
│ │ └── State.php
│ ├── KeepAliveRequest.php
│ ├── KeepAliveResponse.php
│ ├── KeepAliveResult.php
│ ├── KeepAliveResult
│ │ └── SessionStatus.php
│ ├── KeyRange.php
│ ├── OnlineModeSettings.php
│ ├── PartitionStats.php
│ ├── PartitioningPolicy.php
│ ├── PartitioningPolicy
│ │ └── AutoPartitioningPolicy.php
│ ├── PartitioningPolicyDescription.php
│ ├── PartitioningSettings.php
│ ├── PrepareDataQueryRequest.php
│ ├── PrepareDataQueryResponse.php
│ ├── PrepareQueryResult.php
│ ├── Query.php
│ ├── QueryCachePolicy.php
│ ├── QueryMeta.php
│ ├── QueryStatsCollection.php
│ ├── QueryStatsCollection
│ │ └── Mode.php
│ ├── ReadReplicasSettings.php
│ ├── ReadTableRequest.php
│ ├── ReadTableResponse.php
│ ├── ReadTableResult.php
│ ├── RenameIndexItem.php
│ ├── RenameTableItem.php
│ ├── RenameTablesRequest.php
│ ├── RenameTablesResponse.php
│ ├── ReplicationPolicy.php
│ ├── ReplicationPolicyDescription.php
│ ├── RollbackTransactionRequest.php
│ ├── RollbackTransactionResponse.php
│ ├── SerializableModeSettings.php
│ ├── SnapshotModeSettings.php
│ ├── StaleModeSettings.php
│ ├── StoragePolicy.php
│ ├── StoragePolicyDescription.php
│ ├── StoragePool.php
│ ├── StorageSettings.php
│ ├── TableIndex.php
│ ├── TableIndexDescription.php
│ ├── TableIndexDescription
│ │ └── Status.php
│ ├── TableProfile.php
│ ├── TableProfileDescription.php
│ ├── TableStats.php
│ ├── TransactionControl.php
│ ├── TransactionMeta.php
│ ├── TransactionSettings.php
│ ├── TtlSettings.php
│ ├── V1
│ │ └── TableServiceClient.php
│ ├── ValueSinceUnixEpochModeSettings.php
│ └── ValueSinceUnixEpochModeSettings
│ │ └── Unit.php
│ ├── TableStats
│ ├── CompilationStats.php
│ ├── OperationStats.php
│ ├── QueryPhaseStats.php
│ ├── QueryStats.php
│ └── TableAccessStats.php
│ ├── TaggedType.php
│ ├── Topic
│ ├── AddOffsetsToTransactionRequest.php
│ ├── AddOffsetsToTransactionRequest
│ │ ├── TopicOffsets.php
│ │ └── TopicOffsets
│ │ │ └── PartitionOffsets.php
│ ├── AddOffsetsToTransactionResponse.php
│ ├── AddOffsetsToTransactionResult.php
│ ├── AlterConsumer.php
│ ├── AlterPartitioningSettings.php
│ ├── AlterTopicRequest.php
│ ├── AlterTopicResponse.php
│ ├── AlterTopicResult.php
│ ├── Codec.php
│ ├── Consumer.php
│ ├── Consumer
│ │ └── ConsumerStats.php
│ ├── CreateTopicRequest.php
│ ├── CreateTopicResponse.php
│ ├── CreateTopicResult.php
│ ├── DescribeConsumerRequest.php
│ ├── DescribeConsumerResponse.php
│ ├── DescribeConsumerResult.php
│ ├── DescribeConsumerResult
│ │ ├── PartitionConsumerStats.php
│ │ └── PartitionInfo.php
│ ├── DescribeTopicRequest.php
│ ├── DescribeTopicResponse.php
│ ├── DescribeTopicResult.php
│ ├── DescribeTopicResult
│ │ ├── PartitionInfo.php
│ │ └── TopicStats.php
│ ├── DropTopicRequest.php
│ ├── DropTopicResponse.php
│ ├── DropTopicResult.php
│ ├── MeteringMode.php
│ ├── MultipleWindowsStat.php
│ ├── OffsetsRange.php
│ ├── PartitionStats.php
│ ├── PartitioningSettings.php
│ ├── StreamReadMessage.php
│ ├── StreamReadMessage
│ │ ├── CommitOffsetRequest.php
│ │ ├── CommitOffsetRequest
│ │ │ └── PartitionCommitOffset.php
│ │ ├── CommitOffsetResponse.php
│ │ ├── CommitOffsetResponse
│ │ │ └── PartitionCommittedOffset.php
│ │ ├── FromClient.php
│ │ ├── FromServer.php
│ │ ├── InitRequest.php
│ │ ├── InitRequest
│ │ │ └── TopicReadSettings.php
│ │ ├── InitResponse.php
│ │ ├── PartitionSession.php
│ │ ├── PartitionSessionStatusRequest.php
│ │ ├── PartitionSessionStatusResponse.php
│ │ ├── ReadRequest.php
│ │ ├── ReadResponse.php
│ │ ├── ReadResponse
│ │ │ ├── Batch.php
│ │ │ ├── MessageData.php
│ │ │ └── PartitionData.php
│ │ ├── StartPartitionSessionRequest.php
│ │ ├── StartPartitionSessionResponse.php
│ │ ├── StopPartitionSessionRequest.php
│ │ └── StopPartitionSessionResponse.php
│ ├── StreamWriteMessage.php
│ ├── StreamWriteMessage
│ │ ├── FromClient.php
│ │ ├── FromServer.php
│ │ ├── InitRequest.php
│ │ ├── InitResponse.php
│ │ ├── WriteRequest.php
│ │ ├── WriteRequest
│ │ │ └── MessageData.php
│ │ ├── WriteResponse.php
│ │ └── WriteResponse
│ │ │ ├── WriteAck.php
│ │ │ ├── WriteAck
│ │ │ ├── Skipped.php
│ │ │ ├── Skipped
│ │ │ │ └── Reason.php
│ │ │ └── Written.php
│ │ │ └── WriteStatistics.php
│ ├── SupportedCodecs.php
│ ├── UpdateTokenRequest.php
│ ├── UpdateTokenResponse.php
│ └── V1
│ │ └── TopicServiceClient.php
│ ├── TupleType.php
│ ├── Type.php
│ ├── Type
│ └── PrimitiveTypeId.php
│ ├── TypedValue.php
│ ├── Value.php
│ ├── ValuePair.php
│ ├── VariantType.php
│ └── VirtualTimestamp.php
├── slo-workload
├── .gitignore
├── Dockerfile
├── README.MD
├── application.php
├── composer.json
├── php-grpc.Dockerfile
└── src
│ ├── Command.php
│ ├── Commands
│ ├── CleanupCommand.php
│ ├── CreateCommand.php
│ └── RunCommand.php
│ ├── DataGenerator.php
│ ├── Defaults.php
│ ├── SimpleSloLogger.php
│ └── Utils.php
└── src
├── Auth
├── Auth.php
├── EnvironCredentials.php
├── IamAuth.php
├── Implement
│ ├── AccessTokenAuthentication.php
│ ├── AnonymousAuthentication.php
│ ├── JwtWithJsonAuthentication.php
│ ├── JwtWithPrivateKeyAuthentication.php
│ ├── MetadataAuthentication.php
│ ├── OAuthTokenAuthentication.php
│ └── StaticAuthentication.php
├── JwtAuth.php
├── ReadTokenFromFile.php
├── TokenInfo.php
└── UseConfigInterface.php
├── AuthService.php
├── Cluster.php
├── Connection.php
├── Contracts
├── IamTokenContract.php
├── SessionPoolContract.php
└── TypeContract.php
├── Discovery.php
├── Enums
├── CollectQueryStatsMode.php
└── ScanQueryMode.php
├── Exception.php
├── Exceptions
├── Grpc
│ ├── AbortedException.php
│ ├── AlreadyExistsException.php
│ ├── CanceledException.php
│ ├── DataLossException.php
│ ├── DeadlineExceededException.php
│ ├── FailedPreconditionException.php
│ ├── InternalException.php
│ ├── InvalidArgumentException.php
│ ├── NotFoundException.php
│ ├── OutOfRangeException.php
│ ├── PermissionDeniedException.php
│ ├── ResourceExhaustedException.php
│ ├── UnauthenticatedException.php
│ ├── UnavailableException.php
│ ├── UnimplementedException.php
│ └── UnknownException.php
├── NonRetryableException.php
├── RetryableException.php
└── Ydb
│ ├── AbortedException.php
│ ├── AlreadyExistsException.php
│ ├── BadRequestException.php
│ ├── BadSessionException.php
│ ├── CancelledException.php
│ ├── ClientResourceExhaustedException.php
│ ├── GenericErrorException.php
│ ├── InternalErrorException.php
│ ├── NotFoundException.php
│ ├── OverloadedException.php
│ ├── PreconditionFailedException.php
│ ├── SchemeErrorException.php
│ ├── SessionBusyException.php
│ ├── SessionExpiredException.php
│ ├── StatusCodeUnspecified.php
│ ├── TimeoutException.php
│ ├── UnauthorizedException.php
│ ├── UnavailableException.php
│ ├── UndeterminedException.php
│ └── UnsupportedException.php
├── Iam.php
├── Issue.php
├── Jwt
└── Jwt.php
├── Logger
├── NullLogger.php
└── SimpleStdLogger.php
├── Operations.php
├── QueryResult.php
├── QueryStats
├── CompilationStats.php
├── OperationStats.php
├── QueryPhaseStats.php
├── QueryStats.php
└── TableAccessStats.php
├── Retry
├── Backoff.php
├── Retry.php
└── RetryParams.php
├── Scheme.php
├── Scripting.php
├── Session.php
├── Sessions
├── FileSessionPool.php
└── MemorySessionPool.php
├── Statement.php
├── Table.php
├── Traits
├── LoggerTrait.php
├── ParseResultTrait.php
├── RequestTrait.php
├── TableHelpersTrait.php
├── TypeHelpersTrait.php
└── TypeValueHelpersTrait.php
├── Types
├── AbstractType.php
├── BigIntType.php
├── BoolType.php
├── DateType.php
├── DatetimeType.php
├── DecimalType.php
├── DoubleType.php
├── FloatType.php
├── Int16Type.php
├── Int32Type.php
├── Int64Type.php
├── Int8Type.php
├── IntType.php
├── JsonType.php
├── ListType.php
├── OptionalType.php
├── SmallIntType.php
├── StringType.php
├── StructType.php
├── TimestampType.php
├── TinyIntType.php
├── TupleType.php
├── Uint16Type.php
├── Uint32Type.php
├── Uint64Type.php
├── Uint8Type.php
├── UintType.php
├── Utf8Type.php
└── YsonType.php
├── Version.php
├── Ydb.php
├── YdbQuery.php
└── YdbTable.php
/CODEOWNERS:
--------------------------------------------------------------------------------
1 | * @rekby @asmyasnikov
2 |
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ydb-platform/ydb-php-sdk",
3 | "description": "YDB PHP SDK",
4 | "license": "Apache-2.0",
5 | "authors": [
6 | {
7 | "name": "Alexei Shabalin",
8 | "email": "mail@alshabalin.com"
9 | }
10 | ],
11 | "require": {
12 | "php": ">=7.2",
13 | "ext-bcmath": "*",
14 | "ext-curl": "*",
15 | "ext-grpc": "*",
16 | "ext-json": "*",
17 | "google/protobuf": "~3.15.8",
18 | "grpc/grpc": "^1.35",
19 | "phpseclib/phpseclib": "^2.0|^3.0",
20 | "psr/log": "^1|^2|^3"
21 | },
22 | "require-dev": {
23 | "phpunit/phpunit": ">= 6.0, <10.0",
24 | "overtrue/phplint": "^3.0"
25 | },
26 | "autoload": {
27 | "psr-4": {
28 | "Ydb\\": "protos/Ydb/",
29 | "GPBMetadata\\": "protos/GPBMetadata/",
30 | "YdbPlatform\\Ydb\\": "src/"
31 | }
32 | },
33 | "autoload-dev": {
34 | "psr-4": {
35 | "YdbPlatform\\Ydb\\Test\\": "tests",
36 | "App\\": "examples/",
37 | "YdbPlatform\\Ydb\\Slo\\": "slo-workload"
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/examples/.env.example:
--------------------------------------------------------------------------------
1 | # Common YDB settings
2 | DB_ENDPOINT=ydb.serverless.yandexcloud.net:2135
3 | DB_DATABASE=
4 |
5 | YDB_ANONYMOUS=false
6 | YDB_INSECURE=false
7 |
8 | # Auto discovery
9 | DB_DISCOVERY=false
10 |
11 | # Metadata URL authentication
12 | USE_METADATA=false
13 |
14 | # OAuth token authentication
15 | DB_OAUTH_TOKEN=
16 |
17 | # Private key authentication
18 | SA_PRIVATE_KEY_FILE=
19 | SA_ACCESS_KEY_ID=
20 | SA_ID=
21 |
22 | # Service account JSON file authentication
23 | SA_SERVICE_FILE=
24 |
25 | # Root CA file (dedicated server only)
26 | YDB_SSL_ROOT_CERTIFICATES_FILE=
27 |
28 | # Logging settings
29 | USE_LOGGER=false
30 |
--------------------------------------------------------------------------------
/examples/.gitignore:
--------------------------------------------------------------------------------
1 | /vendor
2 | .env
3 | composer.lock
4 | /*.key
5 | /*.pem
6 | /sa_name.json
7 | /ydb_data
8 | /ydb_certs
9 |
--------------------------------------------------------------------------------
/examples/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM thecodingmachine/php:8.0-v4-cli
2 |
3 | ENV PHP_EXTENSION_GRPC=1
4 | ENV PHP_EXTENSION_BCMATH=1
5 |
6 | WORKDIR /usr/src/app
7 |
8 | CMD [ "php", "console", "select1" ]
9 |
10 |
--------------------------------------------------------------------------------
/examples/app/Commands/ListEndpointsCommand.php:
--------------------------------------------------------------------------------
1 | appService = new AppService;
26 |
27 | parent::__construct();
28 | }
29 |
30 | protected function configure()
31 | {
32 | $this->setDescription('Get the endpoints.');
33 | }
34 |
35 | /**
36 | * @param InputInterface $input
37 | * @param OutputInterface $output
38 | * @return int
39 | */
40 | protected function execute(InputInterface $input, OutputInterface $output)
41 | {
42 | $ydb = $this->appService->initYdb();
43 |
44 | $result = $ydb->retry(function (Ydb $ydb) use ($output) {
45 |
46 | $discovery = $ydb->discovery();
47 |
48 | return $discovery->listEndpoints();
49 |
50 | }, true);
51 |
52 | $output->writeln(json_encode($result, 480));
53 |
54 | return Command::SUCCESS;
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/examples/app/Commands/MakeDirectoryCommand.php:
--------------------------------------------------------------------------------
1 | appService = new AppService;
27 |
28 | parent::__construct();
29 | }
30 |
31 | protected function configure()
32 | {
33 | $this->setDescription('Make a directory.');
34 |
35 | $this->addArgument('dirname', InputArgument::REQUIRED, 'The directory name.');
36 | }
37 |
38 | /**
39 | * @param InputInterface $input
40 | * @param OutputInterface $output
41 | * @return int
42 | */
43 | protected function execute(InputInterface $input, OutputInterface $output)
44 | {
45 | $dirname = $input->getArgument('dirname');
46 |
47 | $ydb = $this->appService->initYdb();
48 |
49 | $result = $ydb->retry(function (Ydb $ydb) use ($output, $dirname) {
50 | $scheme = $ydb->scheme();
51 |
52 | return $scheme->makeDirectory($dirname);
53 | }, true);
54 |
55 | $output->writeln(json_encode($result, 480));
56 |
57 | return Command::SUCCESS;
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/examples/app/Commands/RemoveDirectoryCommand.php:
--------------------------------------------------------------------------------
1 | appService = new AppService;
27 |
28 | parent::__construct();
29 | }
30 |
31 | protected function configure()
32 | {
33 | $this->setDescription('Delete a directory.');
34 |
35 | $this->addArgument('dirname', InputArgument::REQUIRED, 'The directory name.');
36 | }
37 |
38 | /**
39 | * @param InputInterface $input
40 | * @param OutputInterface $output
41 | * @return int
42 | */
43 | protected function execute(InputInterface $input, OutputInterface $output)
44 | {
45 | $dirname = $input->getArgument('dirname') ?: '';
46 |
47 | $ydb = $this->appService->initYdb();
48 |
49 | $result = $ydb->retry(function (Ydb $ydb) use ($output, $dirname) {
50 |
51 | $scheme = $ydb->scheme();
52 |
53 | return $scheme->removeDirectory($dirname);
54 |
55 | }, true);
56 |
57 | $output->writeln(json_encode($result, 480));
58 |
59 | return Command::SUCCESS;
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/examples/app/Commands/Select1Command.php:
--------------------------------------------------------------------------------
1 | appService = new AppService;
29 |
30 | parent::__construct();
31 | }
32 |
33 | protected function configure()
34 | {
35 | $this->setDescription('Select 1.');
36 | }
37 |
38 | /**
39 | * @param InputInterface $input
40 | * @param OutputInterface $output
41 | * @return int
42 | * @throws \YandexCloud\Ydb\Exception
43 | */
44 | protected function execute(InputInterface $input, OutputInterface $output)
45 | {
46 | $ydb = $this->appService->initYdb();
47 |
48 | $result = $ydb->table()->retrySession(function (Session $session) use ($output) {
49 |
50 | return $session->query('select 1;');
51 |
52 | }, true);
53 |
54 | $output->writeln('Column count: ' . $result->columnCount());
55 | $output->writeln('Row count: ' . $result->rowCount());
56 |
57 | $t = new Table($output);
58 | $t
59 | ->setHeaders(array_map(function($column) {
60 | return $column['name'];
61 | }, $result->columns()))
62 | ->setRows($result->rows())
63 | ;
64 | $t->render();
65 |
66 | return Command::SUCCESS;
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/examples/app/Commands/WhoAmICommand.php:
--------------------------------------------------------------------------------
1 | appService = new AppService;
26 |
27 | parent::__construct();
28 | }
29 |
30 | protected function configure()
31 | {
32 | $this->setDescription('Get the WhoAmI information.');
33 | }
34 |
35 | /**
36 | * @param InputInterface $input
37 | * @param OutputInterface $output
38 | * @return int
39 | */
40 | protected function execute(InputInterface $input, OutputInterface $output)
41 | {
42 | $ydb = $this->appService->initYdb();
43 |
44 | $result = $ydb->retry(function (Ydb $ydb) use ($output) {
45 |
46 | $discovery = $ydb->discovery();
47 |
48 | return $discovery->whoAmI();
49 |
50 | }, true);
51 |
52 | $output->writeln($result);
53 |
54 | return Command::SUCCESS;
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/examples/application.php:
--------------------------------------------------------------------------------
1 | load();
6 |
7 | $application = new Symfony\Component\Console\Application;
8 |
9 | $application->add(new App\Commands\Select1Command);
10 |
11 | $application->add(new App\Commands\WhoAmICommand);
12 | $application->add(new App\Commands\ListEndpointsCommand);
13 |
14 | $application->add(new App\Commands\MakeDirectoryCommand);
15 | $application->add(new App\Commands\ListDirectoryCommand);
16 | $application->add(new App\Commands\RemoveDirectoryCommand);
17 |
18 | $application->add(new App\Commands\CreateTableCommand);
19 | $application->add(new App\Commands\SelectCommand);
20 |
21 | $application->add(new App\Commands\ReadTableCommand);
22 |
23 | $application->add(new App\Commands\BasicExampleCommand);
24 |
25 | $application->run();
26 |
--------------------------------------------------------------------------------
/examples/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ycloud/ydb-php-examples",
3 | "description": "YDB PHP examples project",
4 | "license": "Apache-2.0",
5 | "type": "project",
6 | "authors": [
7 | {
8 | "name": "Alexei Shabalin",
9 | "email": "mail@alshabalin.com"
10 | }
11 | ],
12 | "require": {
13 | "ydb-platform/ydb-php-sdk": "1.*",
14 | "symfony/console": "^5.2",
15 | "vlucas/phpdotenv": "^5.3",
16 | "monolog/monolog": "^2.2"
17 | },
18 | "autoload": {
19 | "psr-4": {
20 | "App\\": "app/"
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/examples/console:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env php
2 | Ydb.Auth.LoginResult
13 | */
14 | class LoginResult extends \Google\Protobuf\Internal\Message
15 | {
16 | /**
17 | * Generated from protobuf field string token = 1;
18 | */
19 | protected $token = '';
20 |
21 | /**
22 | * Constructor.
23 | *
24 | * @param array $data {
25 | * Optional. Data for populating the Message object.
26 | *
27 | * @type string $token
28 | * }
29 | */
30 | public function __construct($data = NULL) {
31 | \GPBMetadata\Protos\YdbAuth::initOnce();
32 | parent::__construct($data);
33 | }
34 |
35 | /**
36 | * Generated from protobuf field string token = 1;
37 | * @return string
38 | */
39 | public function getToken()
40 | {
41 | return $this->token;
42 | }
43 |
44 | /**
45 | * Generated from protobuf field string token = 1;
46 | * @param string $var
47 | * @return $this
48 | */
49 | public function setToken($var)
50 | {
51 | GPBUtil::checkString($var, True);
52 | $this->token = $var;
53 |
54 | return $this;
55 | }
56 |
57 | }
58 |
59 |
--------------------------------------------------------------------------------
/protos/Ydb/Auth/V1/AuthServiceClient.php:
--------------------------------------------------------------------------------
1 | _simpleRequest('/Ydb.Auth.V1.AuthService/Login',
29 | $argument,
30 | ['\Ydb\Auth\LoginResponse', 'decode'],
31 | $metadata, $options);
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/protos/Ydb/Cms/AlterDatabaseResponse.php:
--------------------------------------------------------------------------------
1 | Ydb.Cms.AlterDatabaseResponse
13 | */
14 | class AlterDatabaseResponse extends \Google\Protobuf\Internal\Message
15 | {
16 | /**
17 | * Generated from protobuf field .Ydb.Operations.Operation operation = 1;
18 | */
19 | protected $operation = null;
20 |
21 | /**
22 | * Constructor.
23 | *
24 | * @param array $data {
25 | * Optional. Data for populating the Message object.
26 | *
27 | * @type \Ydb\Operations\Operation $operation
28 | * }
29 | */
30 | public function __construct($data = NULL) {
31 | \GPBMetadata\Protos\YdbCms::initOnce();
32 | parent::__construct($data);
33 | }
34 |
35 | /**
36 | * Generated from protobuf field .Ydb.Operations.Operation operation = 1;
37 | * @return \Ydb\Operations\Operation|null
38 | */
39 | public function getOperation()
40 | {
41 | return $this->operation;
42 | }
43 |
44 | public function hasOperation()
45 | {
46 | return isset($this->operation);
47 | }
48 |
49 | public function clearOperation()
50 | {
51 | unset($this->operation);
52 | }
53 |
54 | /**
55 | * Generated from protobuf field .Ydb.Operations.Operation operation = 1;
56 | * @param \Ydb\Operations\Operation $var
57 | * @return $this
58 | */
59 | public function setOperation($var)
60 | {
61 | GPBUtil::checkMessage($var, \Ydb\Operations\Operation::class);
62 | $this->operation = $var;
63 |
64 | return $this;
65 | }
66 |
67 | }
68 |
69 |
--------------------------------------------------------------------------------
/protos/Ydb/Cms/CreateDatabaseResponse.php:
--------------------------------------------------------------------------------
1 | Ydb.Cms.CreateDatabaseResponse
13 | */
14 | class CreateDatabaseResponse extends \Google\Protobuf\Internal\Message
15 | {
16 | /**
17 | * Generated from protobuf field .Ydb.Operations.Operation operation = 1;
18 | */
19 | protected $operation = null;
20 |
21 | /**
22 | * Constructor.
23 | *
24 | * @param array $data {
25 | * Optional. Data for populating the Message object.
26 | *
27 | * @type \Ydb\Operations\Operation $operation
28 | * }
29 | */
30 | public function __construct($data = NULL) {
31 | \GPBMetadata\Protos\YdbCms::initOnce();
32 | parent::__construct($data);
33 | }
34 |
35 | /**
36 | * Generated from protobuf field .Ydb.Operations.Operation operation = 1;
37 | * @return \Ydb\Operations\Operation|null
38 | */
39 | public function getOperation()
40 | {
41 | return $this->operation;
42 | }
43 |
44 | public function hasOperation()
45 | {
46 | return isset($this->operation);
47 | }
48 |
49 | public function clearOperation()
50 | {
51 | unset($this->operation);
52 | }
53 |
54 | /**
55 | * Generated from protobuf field .Ydb.Operations.Operation operation = 1;
56 | * @param \Ydb\Operations\Operation $var
57 | * @return $this
58 | */
59 | public function setOperation($var)
60 | {
61 | GPBUtil::checkMessage($var, \Ydb\Operations\Operation::class);
62 | $this->operation = $var;
63 |
64 | return $this;
65 | }
66 |
67 | }
68 |
69 |
--------------------------------------------------------------------------------
/protos/Ydb/Cms/ListDatabasesResult.php:
--------------------------------------------------------------------------------
1 | Ydb.Cms.ListDatabasesResult
13 | */
14 | class ListDatabasesResult extends \Google\Protobuf\Internal\Message
15 | {
16 | /**
17 | * Generated from protobuf field repeated string paths = 1;
18 | */
19 | private $paths;
20 |
21 | /**
22 | * Constructor.
23 | *
24 | * @param array $data {
25 | * Optional. Data for populating the Message object.
26 | *
27 | * @type array|\Google\Protobuf\Internal\RepeatedField $paths
28 | * }
29 | */
30 | public function __construct($data = NULL) {
31 | \GPBMetadata\Protos\YdbCms::initOnce();
32 | parent::__construct($data);
33 | }
34 |
35 | /**
36 | * Generated from protobuf field repeated string paths = 1;
37 | * @return \Google\Protobuf\Internal\RepeatedField
38 | */
39 | public function getPaths()
40 | {
41 | return $this->paths;
42 | }
43 |
44 | /**
45 | * Generated from protobuf field repeated string paths = 1;
46 | * @param array|\Google\Protobuf\Internal\RepeatedField $var
47 | * @return $this
48 | */
49 | public function setPaths($var)
50 | {
51 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
52 | $this->paths = $arr;
53 |
54 | return $this;
55 | }
56 |
57 | }
58 |
59 |
--------------------------------------------------------------------------------
/protos/Ydb/Cms/RemoveDatabaseResponse.php:
--------------------------------------------------------------------------------
1 | Ydb.Cms.RemoveDatabaseResponse
13 | */
14 | class RemoveDatabaseResponse extends \Google\Protobuf\Internal\Message
15 | {
16 | /**
17 | * Generated from protobuf field .Ydb.Operations.Operation operation = 1;
18 | */
19 | protected $operation = null;
20 |
21 | /**
22 | * Constructor.
23 | *
24 | * @param array $data {
25 | * Optional. Data for populating the Message object.
26 | *
27 | * @type \Ydb\Operations\Operation $operation
28 | * }
29 | */
30 | public function __construct($data = NULL) {
31 | \GPBMetadata\Protos\YdbCms::initOnce();
32 | parent::__construct($data);
33 | }
34 |
35 | /**
36 | * Generated from protobuf field .Ydb.Operations.Operation operation = 1;
37 | * @return \Ydb\Operations\Operation|null
38 | */
39 | public function getOperation()
40 | {
41 | return $this->operation;
42 | }
43 |
44 | public function hasOperation()
45 | {
46 | return isset($this->operation);
47 | }
48 |
49 | public function clearOperation()
50 | {
51 | unset($this->operation);
52 | }
53 |
54 | /**
55 | * Generated from protobuf field .Ydb.Operations.Operation operation = 1;
56 | * @param \Ydb\Operations\Operation $var
57 | * @return $this
58 | */
59 | public function setOperation($var)
60 | {
61 | GPBUtil::checkMessage($var, \Ydb\Operations\Operation::class);
62 | $this->operation = $var;
63 |
64 | return $this;
65 | }
66 |
67 | }
68 |
69 |
--------------------------------------------------------------------------------
/protos/Ydb/Coordination/SessionRequest/SessionStop.php:
--------------------------------------------------------------------------------
1 | Ydb.Coordination.SessionRequest.SessionStop
16 | */
17 | class SessionStop extends \Google\Protobuf\Internal\Message
18 | {
19 |
20 | /**
21 | * Constructor.
22 | *
23 | * @param array $data {
24 | * Optional. Data for populating the Message object.
25 | *
26 | * }
27 | */
28 | public function __construct($data = NULL) {
29 | \GPBMetadata\Protos\YdbCoordination::initOnce();
30 | parent::__construct($data);
31 | }
32 |
33 | }
34 |
35 | // Adding a class alias for backwards compatibility with the previous class name.
36 | class_alias(SessionStop::class, \Ydb\Coordination\SessionRequest_SessionStop::class);
37 |
38 |
--------------------------------------------------------------------------------
/protos/Ydb/Coordination/SessionResponse/SessionStopped.php:
--------------------------------------------------------------------------------
1 | Ydb.Coordination.SessionResponse.SessionStopped
16 | */
17 | class SessionStopped extends \Google\Protobuf\Internal\Message
18 | {
19 | /**
20 | * Generated from protobuf field uint64 session_id = 1;
21 | */
22 | protected $session_id = 0;
23 |
24 | /**
25 | * Constructor.
26 | *
27 | * @param array $data {
28 | * Optional. Data for populating the Message object.
29 | *
30 | * @type int|string $session_id
31 | * }
32 | */
33 | public function __construct($data = NULL) {
34 | \GPBMetadata\Protos\YdbCoordination::initOnce();
35 | parent::__construct($data);
36 | }
37 |
38 | /**
39 | * Generated from protobuf field uint64 session_id = 1;
40 | * @return int|string
41 | */
42 | public function getSessionId()
43 | {
44 | return $this->session_id;
45 | }
46 |
47 | /**
48 | * Generated from protobuf field uint64 session_id = 1;
49 | * @param int|string $var
50 | * @return $this
51 | */
52 | public function setSessionId($var)
53 | {
54 | GPBUtil::checkUint64($var);
55 | $this->session_id = $var;
56 |
57 | return $this;
58 | }
59 |
60 | }
61 |
62 | // Adding a class alias for backwards compatibility with the previous class name.
63 | class_alias(SessionStopped::class, \Ydb\Coordination\SessionResponse_SessionStopped::class);
64 |
65 |
--------------------------------------------------------------------------------
/protos/Ydb/Coordination/Unsupported.php:
--------------------------------------------------------------------------------
1 | Ydb.Coordination.Unsupported
16 | */
17 | class Unsupported extends \Google\Protobuf\Internal\Message
18 | {
19 |
20 | /**
21 | * Constructor.
22 | *
23 | * @param array $data {
24 | * Optional. Data for populating the Message object.
25 | *
26 | * }
27 | */
28 | public function __construct($data = NULL) {
29 | \GPBMetadata\Protos\YdbCoordination::initOnce();
30 | parent::__construct($data);
31 | }
32 |
33 | }
34 |
35 |
--------------------------------------------------------------------------------
/protos/Ydb/CostInfo.php:
--------------------------------------------------------------------------------
1 | Ydb.CostInfo
13 | */
14 | class CostInfo extends \Google\Protobuf\Internal\Message
15 | {
16 | /**
17 | * Total amount of request units (RU), consumed by the operation.
18 | *
19 | * Generated from protobuf field double consumed_units = 1;
20 | */
21 | protected $consumed_units = 0.0;
22 |
23 | /**
24 | * Constructor.
25 | *
26 | * @param array $data {
27 | * Optional. Data for populating the Message object.
28 | *
29 | * @type float $consumed_units
30 | * Total amount of request units (RU), consumed by the operation.
31 | * }
32 | */
33 | public function __construct($data = NULL) {
34 | \GPBMetadata\Protos\YdbCommon::initOnce();
35 | parent::__construct($data);
36 | }
37 |
38 | /**
39 | * Total amount of request units (RU), consumed by the operation.
40 | *
41 | * Generated from protobuf field double consumed_units = 1;
42 | * @return float
43 | */
44 | public function getConsumedUnits()
45 | {
46 | return $this->consumed_units;
47 | }
48 |
49 | /**
50 | * Total amount of request units (RU), consumed by the operation.
51 | *
52 | * Generated from protobuf field double consumed_units = 1;
53 | * @param float $var
54 | * @return $this
55 | */
56 | public function setConsumedUnits($var)
57 | {
58 | GPBUtil::checkDouble($var);
59 | $this->consumed_units = $var;
60 |
61 | return $this;
62 | }
63 |
64 | }
65 |
66 |
--------------------------------------------------------------------------------
/protos/Ydb/Discovery/V1/DiscoveryServiceClient.php:
--------------------------------------------------------------------------------
1 | _simpleRequest('/Ydb.Discovery.V1.DiscoveryService/ListEndpoints',
28 | $argument,
29 | ['\Ydb\Discovery\ListEndpointsResponse', 'decode'],
30 | $metadata, $options);
31 | }
32 |
33 | /**
34 | * @param \Ydb\Discovery\WhoAmIRequest $argument input argument
35 | * @param array $metadata metadata
36 | * @param array $options call options
37 | * @return \Grpc\UnaryCall
38 | */
39 | public function WhoAmI(\Ydb\Discovery\WhoAmIRequest $argument,
40 | $metadata = [], $options = []) {
41 | return $this->_simpleRequest('/Ydb.Discovery.V1.DiscoveryService/WhoAmI',
42 | $argument,
43 | ['\Ydb\Discovery\WhoAmIResponse', 'decode'],
44 | $metadata, $options);
45 | }
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/protos/Ydb/Discovery/WhoAmIRequest.php:
--------------------------------------------------------------------------------
1 | Ydb.Discovery.WhoAmIRequest
13 | */
14 | class WhoAmIRequest extends \Google\Protobuf\Internal\Message
15 | {
16 | /**
17 | * Include user groups in response
18 | *
19 | * Generated from protobuf field bool include_groups = 1;
20 | */
21 | protected $include_groups = false;
22 |
23 | /**
24 | * Constructor.
25 | *
26 | * @param array $data {
27 | * Optional. Data for populating the Message object.
28 | *
29 | * @type bool $include_groups
30 | * Include user groups in response
31 | * }
32 | */
33 | public function __construct($data = NULL) {
34 | \GPBMetadata\Protos\YdbDiscovery::initOnce();
35 | parent::__construct($data);
36 | }
37 |
38 | /**
39 | * Include user groups in response
40 | *
41 | * Generated from protobuf field bool include_groups = 1;
42 | * @return bool
43 | */
44 | public function getIncludeGroups()
45 | {
46 | return $this->include_groups;
47 | }
48 |
49 | /**
50 | * Include user groups in response
51 | *
52 | * Generated from protobuf field bool include_groups = 1;
53 | * @param bool $var
54 | * @return $this
55 | */
56 | public function setIncludeGroups($var)
57 | {
58 | GPBUtil::checkBool($var);
59 | $this->include_groups = $var;
60 |
61 | return $this;
62 | }
63 |
64 | }
65 |
66 |
--------------------------------------------------------------------------------
/protos/Ydb/Export/ExportProgress.php:
--------------------------------------------------------------------------------
1 | Ydb.Export.ExportProgress
15 | */
16 | class ExportProgress extends \Google\Protobuf\Internal\Message
17 | {
18 |
19 | /**
20 | * Constructor.
21 | *
22 | * @param array $data {
23 | * Optional. Data for populating the Message object.
24 | *
25 | * }
26 | */
27 | public function __construct($data = NULL) {
28 | \GPBMetadata\Protos\YdbExport::initOnce();
29 | parent::__construct($data);
30 | }
31 |
32 | }
33 |
34 |
--------------------------------------------------------------------------------
/protos/Ydb/Export/ExportToS3Result.php:
--------------------------------------------------------------------------------
1 | Ydb.Export.ExportToS3Result
13 | */
14 | class ExportToS3Result extends \Google\Protobuf\Internal\Message
15 | {
16 |
17 | /**
18 | * Constructor.
19 | *
20 | * @param array $data {
21 | * Optional. Data for populating the Message object.
22 | *
23 | * }
24 | */
25 | public function __construct($data = NULL) {
26 | \GPBMetadata\Protos\YdbExport::initOnce();
27 | parent::__construct($data);
28 | }
29 |
30 | }
31 |
32 |
--------------------------------------------------------------------------------
/protos/Ydb/Export/ExportToS3Settings/Scheme.php:
--------------------------------------------------------------------------------
1 | Ydb.Export.ExportToS3Settings.Scheme
11 | */
12 | class Scheme
13 | {
14 | /**
15 | * Generated from protobuf enum UNSPECIFIED = 0;
16 | */
17 | const UNSPECIFIED = 0;
18 | /**
19 | * Generated from protobuf enum HTTP = 1;
20 | */
21 | const HTTP = 1;
22 | /**
23 | * Generated from protobuf enum HTTPS = 2;
24 | */
25 | const HTTPS = 2;
26 |
27 | private static $valueToName = [
28 | self::UNSPECIFIED => 'UNSPECIFIED',
29 | self::HTTP => 'HTTP',
30 | self::HTTPS => 'HTTPS',
31 | ];
32 |
33 | public static function name($value)
34 | {
35 | if (!isset(self::$valueToName[$value])) {
36 | throw new UnexpectedValueException(sprintf(
37 | 'Enum %s has no name defined for value %s', __CLASS__, $value));
38 | }
39 | return self::$valueToName[$value];
40 | }
41 |
42 |
43 | public static function value($name)
44 | {
45 | $const = __CLASS__ . '::' . strtoupper($name);
46 | if (!defined($const)) {
47 | throw new UnexpectedValueException(sprintf(
48 | 'Enum %s has no value defined for name %s', __CLASS__, $name));
49 | }
50 | return constant($const);
51 | }
52 | }
53 |
54 | // Adding a class alias for backwards compatibility with the previous class name.
55 | class_alias(Scheme::class, \Ydb\Export\ExportToS3Settings_Scheme::class);
56 |
57 |
--------------------------------------------------------------------------------
/protos/Ydb/Export/ExportToYtResult.php:
--------------------------------------------------------------------------------
1 | Ydb.Export.ExportToYtResult
13 | */
14 | class ExportToYtResult extends \Google\Protobuf\Internal\Message
15 | {
16 |
17 | /**
18 | * Constructor.
19 | *
20 | * @param array $data {
21 | * Optional. Data for populating the Message object.
22 | *
23 | * }
24 | */
25 | public function __construct($data = NULL) {
26 | \GPBMetadata\Protos\YdbExport::initOnce();
27 | parent::__construct($data);
28 | }
29 |
30 | }
31 |
32 |
--------------------------------------------------------------------------------
/protos/Ydb/Export/V1/ExportServiceClient.php:
--------------------------------------------------------------------------------
1 | _simpleRequest('/Ydb.Export.V1.ExportService/ExportToYt',
30 | $argument,
31 | ['\Ydb\Export\ExportToYtResponse', 'decode'],
32 | $metadata, $options);
33 | }
34 |
35 | /**
36 | * Exports data to S3.
37 | * Method starts an asynchronous operation that can be cancelled while it is in progress.
38 | * @param \Ydb\Export\ExportToS3Request $argument input argument
39 | * @param array $metadata metadata
40 | * @param array $options call options
41 | * @return \Grpc\UnaryCall
42 | */
43 | public function ExportToS3(\Ydb\Export\ExportToS3Request $argument,
44 | $metadata = [], $options = []) {
45 | return $this->_simpleRequest('/Ydb.Export.V1.ExportService/ExportToS3',
46 | $argument,
47 | ['\Ydb\Export\ExportToS3Response', 'decode'],
48 | $metadata, $options);
49 | }
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/protos/Ydb/FeatureFlag.php:
--------------------------------------------------------------------------------
1 | Ydb.FeatureFlag
13 | */
14 | class FeatureFlag extends \Google\Protobuf\Internal\Message
15 | {
16 |
17 | /**
18 | * Constructor.
19 | *
20 | * @param array $data {
21 | * Optional. Data for populating the Message object.
22 | *
23 | * }
24 | */
25 | public function __construct($data = NULL) {
26 | \GPBMetadata\Protos\YdbCommon::initOnce();
27 | parent::__construct($data);
28 | }
29 |
30 | }
31 |
32 |
--------------------------------------------------------------------------------
/protos/Ydb/FeatureFlag/Status.php:
--------------------------------------------------------------------------------
1 | Ydb.FeatureFlag.Status
11 | */
12 | class Status
13 | {
14 | /**
15 | * Generated from protobuf enum STATUS_UNSPECIFIED = 0;
16 | */
17 | const STATUS_UNSPECIFIED = 0;
18 | /**
19 | * Generated from protobuf enum ENABLED = 1;
20 | */
21 | const ENABLED = 1;
22 | /**
23 | * Generated from protobuf enum DISABLED = 2;
24 | */
25 | const DISABLED = 2;
26 |
27 | private static $valueToName = [
28 | self::STATUS_UNSPECIFIED => 'STATUS_UNSPECIFIED',
29 | self::ENABLED => 'ENABLED',
30 | self::DISABLED => 'DISABLED',
31 | ];
32 |
33 | public static function name($value)
34 | {
35 | if (!isset(self::$valueToName[$value])) {
36 | throw new UnexpectedValueException(sprintf(
37 | 'Enum %s has no name defined for value %s', __CLASS__, $value));
38 | }
39 | return self::$valueToName[$value];
40 | }
41 |
42 |
43 | public static function value($name)
44 | {
45 | $const = __CLASS__ . '::' . strtoupper($name);
46 | if (!defined($const)) {
47 | throw new UnexpectedValueException(sprintf(
48 | 'Enum %s has no value defined for name %s', __CLASS__, $name));
49 | }
50 | return constant($const);
51 | }
52 | }
53 |
54 | // Adding a class alias for backwards compatibility with the previous class name.
55 | class_alias(Status::class, \Ydb\FeatureFlag_Status::class);
56 |
57 |
--------------------------------------------------------------------------------
/protos/Ydb/Formats/ArrowBatchSettings.php:
--------------------------------------------------------------------------------
1 | Ydb.Formats.ArrowBatchSettings
13 | */
14 | class ArrowBatchSettings extends \Google\Protobuf\Internal\Message
15 | {
16 | /**
17 | * Generated from protobuf field bytes schema = 1;
18 | */
19 | protected $schema = '';
20 |
21 | /**
22 | * Constructor.
23 | *
24 | * @param array $data {
25 | * Optional. Data for populating the Message object.
26 | *
27 | * @type string $schema
28 | * }
29 | */
30 | public function __construct($data = NULL) {
31 | \GPBMetadata\Protos\YdbFormats::initOnce();
32 | parent::__construct($data);
33 | }
34 |
35 | /**
36 | * Generated from protobuf field bytes schema = 1;
37 | * @return string
38 | */
39 | public function getSchema()
40 | {
41 | return $this->schema;
42 | }
43 |
44 | /**
45 | * Generated from protobuf field bytes schema = 1;
46 | * @param string $var
47 | * @return $this
48 | */
49 | public function setSchema($var)
50 | {
51 | GPBUtil::checkString($var, False);
52 | $this->schema = $var;
53 |
54 | return $this;
55 | }
56 |
57 | }
58 |
59 |
--------------------------------------------------------------------------------
/protos/Ydb/Import/ImportDataResult.php:
--------------------------------------------------------------------------------
1 | Ydb.Import.ImportDataResult
13 | */
14 | class ImportDataResult extends \Google\Protobuf\Internal\Message
15 | {
16 |
17 | /**
18 | * Constructor.
19 | *
20 | * @param array $data {
21 | * Optional. Data for populating the Message object.
22 | *
23 | * }
24 | */
25 | public function __construct($data = NULL) {
26 | \GPBMetadata\Protos\YdbImport::initOnce();
27 | parent::__construct($data);
28 | }
29 |
30 | }
31 |
32 |
--------------------------------------------------------------------------------
/protos/Ydb/Import/ImportFromS3Result.php:
--------------------------------------------------------------------------------
1 | Ydb.Import.ImportFromS3Result
13 | */
14 | class ImportFromS3Result extends \Google\Protobuf\Internal\Message
15 | {
16 |
17 | /**
18 | * Constructor.
19 | *
20 | * @param array $data {
21 | * Optional. Data for populating the Message object.
22 | *
23 | * }
24 | */
25 | public function __construct($data = NULL) {
26 | \GPBMetadata\Protos\YdbImport::initOnce();
27 | parent::__construct($data);
28 | }
29 |
30 | }
31 |
32 |
--------------------------------------------------------------------------------
/protos/Ydb/Import/ImportFromS3Settings/Scheme.php:
--------------------------------------------------------------------------------
1 | Ydb.Import.ImportFromS3Settings.Scheme
11 | */
12 | class Scheme
13 | {
14 | /**
15 | * Generated from protobuf enum UNSPECIFIED = 0;
16 | */
17 | const UNSPECIFIED = 0;
18 | /**
19 | * Generated from protobuf enum HTTP = 1;
20 | */
21 | const HTTP = 1;
22 | /**
23 | * Generated from protobuf enum HTTPS = 2;
24 | */
25 | const HTTPS = 2;
26 |
27 | private static $valueToName = [
28 | self::UNSPECIFIED => 'UNSPECIFIED',
29 | self::HTTP => 'HTTP',
30 | self::HTTPS => 'HTTPS',
31 | ];
32 |
33 | public static function name($value)
34 | {
35 | if (!isset(self::$valueToName[$value])) {
36 | throw new UnexpectedValueException(sprintf(
37 | 'Enum %s has no name defined for value %s', __CLASS__, $value));
38 | }
39 | return self::$valueToName[$value];
40 | }
41 |
42 |
43 | public static function value($name)
44 | {
45 | $const = __CLASS__ . '::' . strtoupper($name);
46 | if (!defined($const)) {
47 | throw new UnexpectedValueException(sprintf(
48 | 'Enum %s has no value defined for name %s', __CLASS__, $name));
49 | }
50 | return constant($const);
51 | }
52 | }
53 |
54 | // Adding a class alias for backwards compatibility with the previous class name.
55 | class_alias(Scheme::class, \Ydb\Import\ImportFromS3Settings_Scheme::class);
56 |
57 |
--------------------------------------------------------------------------------
/protos/Ydb/Import/ImportProgress.php:
--------------------------------------------------------------------------------
1 | Ydb.Import.ImportProgress
15 | */
16 | class ImportProgress extends \Google\Protobuf\Internal\Message
17 | {
18 |
19 | /**
20 | * Constructor.
21 | *
22 | * @param array $data {
23 | * Optional. Data for populating the Message object.
24 | *
25 | * }
26 | */
27 | public function __construct($data = NULL) {
28 | \GPBMetadata\Protos\YdbImport::initOnce();
29 | parent::__construct($data);
30 | }
31 |
32 | }
33 |
34 |
--------------------------------------------------------------------------------
/protos/Ydb/Import/V1/ImportServiceClient.php:
--------------------------------------------------------------------------------
1 | _simpleRequest('/Ydb.Import.V1.ImportService/ImportFromS3',
30 | $argument,
31 | ['\Ydb\Import\ImportFromS3Response', 'decode'],
32 | $metadata, $options);
33 | }
34 |
35 | /**
36 | * Writes data to a table.
37 | * Method accepts serialized data in the selected format and writes it non-transactionally.
38 | * @param \Ydb\Import\ImportDataRequest $argument input argument
39 | * @param array $metadata metadata
40 | * @param array $options call options
41 | * @return \Grpc\UnaryCall
42 | */
43 | public function ImportData(\Ydb\Import\ImportDataRequest $argument,
44 | $metadata = [], $options = []) {
45 | return $this->_simpleRequest('/Ydb.Import.V1.ImportService/ImportData',
46 | $argument,
47 | ['\Ydb\Import\ImportDataResponse', 'decode'],
48 | $metadata, $options);
49 | }
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/protos/Ydb/Import/YdbDumpFormat.php:
--------------------------------------------------------------------------------
1 | Ydb.Import.YdbDumpFormat
15 | */
16 | class YdbDumpFormat extends \Google\Protobuf\Internal\Message
17 | {
18 | /**
19 | * Generated from protobuf field repeated string columns = 1;
20 | */
21 | private $columns;
22 |
23 | /**
24 | * Constructor.
25 | *
26 | * @param array $data {
27 | * Optional. Data for populating the Message object.
28 | *
29 | * @type array|\Google\Protobuf\Internal\RepeatedField $columns
30 | * }
31 | */
32 | public function __construct($data = NULL) {
33 | \GPBMetadata\Protos\YdbImport::initOnce();
34 | parent::__construct($data);
35 | }
36 |
37 | /**
38 | * Generated from protobuf field repeated string columns = 1;
39 | * @return \Google\Protobuf\Internal\RepeatedField
40 | */
41 | public function getColumns()
42 | {
43 | return $this->columns;
44 | }
45 |
46 | /**
47 | * Generated from protobuf field repeated string columns = 1;
48 | * @param array|\Google\Protobuf\Internal\RepeatedField $var
49 | * @return $this
50 | */
51 | public function setColumns($var)
52 | {
53 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
54 | $this->columns = $arr;
55 |
56 | return $this;
57 | }
58 |
59 | }
60 |
61 |
--------------------------------------------------------------------------------
/protos/Ydb/ListType.php:
--------------------------------------------------------------------------------
1 | Ydb.ListType
13 | */
14 | class ListType extends \Google\Protobuf\Internal\Message
15 | {
16 | /**
17 | * Generated from protobuf field .Ydb.Type item = 1;
18 | */
19 | protected $item = null;
20 |
21 | /**
22 | * Constructor.
23 | *
24 | * @param array $data {
25 | * Optional. Data for populating the Message object.
26 | *
27 | * @type \Ydb\Type $item
28 | * }
29 | */
30 | public function __construct($data = NULL) {
31 | \GPBMetadata\Protos\YdbValue::initOnce();
32 | parent::__construct($data);
33 | }
34 |
35 | /**
36 | * Generated from protobuf field .Ydb.Type item = 1;
37 | * @return \Ydb\Type|null
38 | */
39 | public function getItem()
40 | {
41 | return $this->item;
42 | }
43 |
44 | public function hasItem()
45 | {
46 | return isset($this->item);
47 | }
48 |
49 | public function clearItem()
50 | {
51 | unset($this->item);
52 | }
53 |
54 | /**
55 | * Generated from protobuf field .Ydb.Type item = 1;
56 | * @param \Ydb\Type $var
57 | * @return $this
58 | */
59 | public function setItem($var)
60 | {
61 | GPBUtil::checkMessage($var, \Ydb\Type::class);
62 | $this->item = $var;
63 |
64 | return $this;
65 | }
66 |
67 | }
68 |
69 |
--------------------------------------------------------------------------------
/protos/Ydb/Monitoring/LocationComputePool.php:
--------------------------------------------------------------------------------
1 | Ydb.Monitoring.LocationComputePool
13 | */
14 | class LocationComputePool extends \Google\Protobuf\Internal\Message
15 | {
16 | /**
17 | * Generated from protobuf field string name = 1;
18 | */
19 | protected $name = '';
20 |
21 | /**
22 | * Constructor.
23 | *
24 | * @param array $data {
25 | * Optional. Data for populating the Message object.
26 | *
27 | * @type string $name
28 | * }
29 | */
30 | public function __construct($data = NULL) {
31 | \GPBMetadata\Protos\YdbMonitoring::initOnce();
32 | parent::__construct($data);
33 | }
34 |
35 | /**
36 | * Generated from protobuf field string name = 1;
37 | * @return string
38 | */
39 | public function getName()
40 | {
41 | return $this->name;
42 | }
43 |
44 | /**
45 | * Generated from protobuf field string name = 1;
46 | * @param string $var
47 | * @return $this
48 | */
49 | public function setName($var)
50 | {
51 | GPBUtil::checkString($var, True);
52 | $this->name = $var;
53 |
54 | return $this;
55 | }
56 |
57 | }
58 |
59 |
--------------------------------------------------------------------------------
/protos/Ydb/Monitoring/LocationDatabase.php:
--------------------------------------------------------------------------------
1 | Ydb.Monitoring.LocationDatabase
13 | */
14 | class LocationDatabase extends \Google\Protobuf\Internal\Message
15 | {
16 | /**
17 | * Generated from protobuf field string name = 1;
18 | */
19 | protected $name = '';
20 |
21 | /**
22 | * Constructor.
23 | *
24 | * @param array $data {
25 | * Optional. Data for populating the Message object.
26 | *
27 | * @type string $name
28 | * }
29 | */
30 | public function __construct($data = NULL) {
31 | \GPBMetadata\Protos\YdbMonitoring::initOnce();
32 | parent::__construct($data);
33 | }
34 |
35 | /**
36 | * Generated from protobuf field string name = 1;
37 | * @return string
38 | */
39 | public function getName()
40 | {
41 | return $this->name;
42 | }
43 |
44 | /**
45 | * Generated from protobuf field string name = 1;
46 | * @param string $var
47 | * @return $this
48 | */
49 | public function setName($var)
50 | {
51 | GPBUtil::checkString($var, True);
52 | $this->name = $var;
53 |
54 | return $this;
55 | }
56 |
57 | }
58 |
59 |
--------------------------------------------------------------------------------
/protos/Ydb/Monitoring/SelfCheck.php:
--------------------------------------------------------------------------------
1 | Ydb.Monitoring.SelfCheck
13 | */
14 | class SelfCheck extends \Google\Protobuf\Internal\Message
15 | {
16 |
17 | /**
18 | * Constructor.
19 | *
20 | * @param array $data {
21 | * Optional. Data for populating the Message object.
22 | *
23 | * }
24 | */
25 | public function __construct($data = NULL) {
26 | \GPBMetadata\Protos\YdbMonitoring::initOnce();
27 | parent::__construct($data);
28 | }
29 |
30 | }
31 |
32 |
--------------------------------------------------------------------------------
/protos/Ydb/Monitoring/StatusFlag.php:
--------------------------------------------------------------------------------
1 | Ydb.Monitoring.StatusFlag
13 | */
14 | class StatusFlag extends \Google\Protobuf\Internal\Message
15 | {
16 |
17 | /**
18 | * Constructor.
19 | *
20 | * @param array $data {
21 | * Optional. Data for populating the Message object.
22 | *
23 | * }
24 | */
25 | public function __construct($data = NULL) {
26 | \GPBMetadata\Protos\YdbMonitoring::initOnce();
27 | parent::__construct($data);
28 | }
29 |
30 | }
31 |
32 |
--------------------------------------------------------------------------------
/protos/Ydb/Monitoring/V1/MonitoringServiceClient.php:
--------------------------------------------------------------------------------
1 | _simpleRequest('/Ydb.Monitoring.V1.MonitoringService/SelfCheck',
29 | $argument,
30 | ['\Ydb\Monitoring\SelfCheckResponse', 'decode'],
31 | $metadata, $options);
32 | }
33 |
34 | /**
35 | * Checks current node health
36 | * @param \Ydb\Monitoring\NodeCheckRequest $argument input argument
37 | * @param array $metadata metadata
38 | * @param array $options call options
39 | * @return \Grpc\UnaryCall
40 | */
41 | public function NodeCheck(\Ydb\Monitoring\NodeCheckRequest $argument,
42 | $metadata = [], $options = []) {
43 | return $this->_simpleRequest('/Ydb.Monitoring.V1.MonitoringService/NodeCheck',
44 | $argument,
45 | ['\Ydb\Monitoring\NodeCheckResponse', 'decode'],
46 | $metadata, $options);
47 | }
48 |
49 | }
50 |
--------------------------------------------------------------------------------
/protos/Ydb/Operations/CancelOperationRequest.php:
--------------------------------------------------------------------------------
1 | Ydb.Operations.CancelOperationRequest
13 | */
14 | class CancelOperationRequest extends \Google\Protobuf\Internal\Message
15 | {
16 | /**
17 | * Generated from protobuf field string id = 1 [(.Ydb.required) = true];
18 | */
19 | protected $id = '';
20 |
21 | /**
22 | * Constructor.
23 | *
24 | * @param array $data {
25 | * Optional. Data for populating the Message object.
26 | *
27 | * @type string $id
28 | * }
29 | */
30 | public function __construct($data = NULL) {
31 | \GPBMetadata\Protos\YdbOperation::initOnce();
32 | parent::__construct($data);
33 | }
34 |
35 | /**
36 | * Generated from protobuf field string id = 1 [(.Ydb.required) = true];
37 | * @return string
38 | */
39 | public function getId()
40 | {
41 | return $this->id;
42 | }
43 |
44 | /**
45 | * Generated from protobuf field string id = 1 [(.Ydb.required) = true];
46 | * @param string $var
47 | * @return $this
48 | */
49 | public function setId($var)
50 | {
51 | GPBUtil::checkString($var, True);
52 | $this->id = $var;
53 |
54 | return $this;
55 | }
56 |
57 | }
58 |
59 |
--------------------------------------------------------------------------------
/protos/Ydb/Operations/ForgetOperationRequest.php:
--------------------------------------------------------------------------------
1 | Ydb.Operations.ForgetOperationRequest
13 | */
14 | class ForgetOperationRequest extends \Google\Protobuf\Internal\Message
15 | {
16 | /**
17 | * Generated from protobuf field string id = 1 [(.Ydb.required) = true];
18 | */
19 | protected $id = '';
20 |
21 | /**
22 | * Constructor.
23 | *
24 | * @param array $data {
25 | * Optional. Data for populating the Message object.
26 | *
27 | * @type string $id
28 | * }
29 | */
30 | public function __construct($data = NULL) {
31 | \GPBMetadata\Protos\YdbOperation::initOnce();
32 | parent::__construct($data);
33 | }
34 |
35 | /**
36 | * Generated from protobuf field string id = 1 [(.Ydb.required) = true];
37 | * @return string
38 | */
39 | public function getId()
40 | {
41 | return $this->id;
42 | }
43 |
44 | /**
45 | * Generated from protobuf field string id = 1 [(.Ydb.required) = true];
46 | * @param string $var
47 | * @return $this
48 | */
49 | public function setId($var)
50 | {
51 | GPBUtil::checkString($var, True);
52 | $this->id = $var;
53 |
54 | return $this;
55 | }
56 |
57 | }
58 |
59 |
--------------------------------------------------------------------------------
/protos/Ydb/Operations/GetOperationRequest.php:
--------------------------------------------------------------------------------
1 | Ydb.Operations.GetOperationRequest
13 | */
14 | class GetOperationRequest extends \Google\Protobuf\Internal\Message
15 | {
16 | /**
17 | * Generated from protobuf field string id = 1 [(.Ydb.required) = true];
18 | */
19 | protected $id = '';
20 |
21 | /**
22 | * Constructor.
23 | *
24 | * @param array $data {
25 | * Optional. Data for populating the Message object.
26 | *
27 | * @type string $id
28 | * }
29 | */
30 | public function __construct($data = NULL) {
31 | \GPBMetadata\Protos\YdbOperation::initOnce();
32 | parent::__construct($data);
33 | }
34 |
35 | /**
36 | * Generated from protobuf field string id = 1 [(.Ydb.required) = true];
37 | * @return string
38 | */
39 | public function getId()
40 | {
41 | return $this->id;
42 | }
43 |
44 | /**
45 | * Generated from protobuf field string id = 1 [(.Ydb.required) = true];
46 | * @param string $var
47 | * @return $this
48 | */
49 | public function setId($var)
50 | {
51 | GPBUtil::checkString($var, True);
52 | $this->id = $var;
53 |
54 | return $this;
55 | }
56 |
57 | }
58 |
59 |
--------------------------------------------------------------------------------
/protos/Ydb/OptionalType.php:
--------------------------------------------------------------------------------
1 | Ydb.OptionalType
13 | */
14 | class OptionalType extends \Google\Protobuf\Internal\Message
15 | {
16 | /**
17 | * Generated from protobuf field .Ydb.Type item = 1;
18 | */
19 | protected $item = null;
20 |
21 | /**
22 | * Constructor.
23 | *
24 | * @param array $data {
25 | * Optional. Data for populating the Message object.
26 | *
27 | * @type \Ydb\Type $item
28 | * }
29 | */
30 | public function __construct($data = NULL) {
31 | \GPBMetadata\Protos\YdbValue::initOnce();
32 | parent::__construct($data);
33 | }
34 |
35 | /**
36 | * Generated from protobuf field .Ydb.Type item = 1;
37 | * @return \Ydb\Type|null
38 | */
39 | public function getItem()
40 | {
41 | return $this->item;
42 | }
43 |
44 | public function hasItem()
45 | {
46 | return isset($this->item);
47 | }
48 |
49 | public function clearItem()
50 | {
51 | unset($this->item);
52 | }
53 |
54 | /**
55 | * Generated from protobuf field .Ydb.Type item = 1;
56 | * @param \Ydb\Type $var
57 | * @return $this
58 | */
59 | public function setItem($var)
60 | {
61 | GPBUtil::checkMessage($var, \Ydb\Type::class);
62 | $this->item = $var;
63 |
64 | return $this;
65 | }
66 |
67 | }
68 |
69 |
--------------------------------------------------------------------------------
/protos/Ydb/QuotaExceeded.php:
--------------------------------------------------------------------------------
1 | Ydb.QuotaExceeded
13 | */
14 | class QuotaExceeded extends \Google\Protobuf\Internal\Message
15 | {
16 | /**
17 | * Generated from protobuf field bool disk = 1;
18 | */
19 | protected $disk = false;
20 |
21 | /**
22 | * Constructor.
23 | *
24 | * @param array $data {
25 | * Optional. Data for populating the Message object.
26 | *
27 | * @type bool $disk
28 | * }
29 | */
30 | public function __construct($data = NULL) {
31 | \GPBMetadata\Protos\YdbCommon::initOnce();
32 | parent::__construct($data);
33 | }
34 |
35 | /**
36 | * Generated from protobuf field bool disk = 1;
37 | * @return bool
38 | */
39 | public function getDisk()
40 | {
41 | return $this->disk;
42 | }
43 |
44 | /**
45 | * Generated from protobuf field bool disk = 1;
46 | * @param bool $var
47 | * @return $this
48 | */
49 | public function setDisk($var)
50 | {
51 | GPBUtil::checkBool($var);
52 | $this->disk = $var;
53 |
54 | return $this;
55 | }
56 |
57 | }
58 |
59 |
--------------------------------------------------------------------------------
/protos/Ydb/RateLimiter/AcquireResourceResult.php:
--------------------------------------------------------------------------------
1 | Ydb.RateLimiter.AcquireResourceResult
13 | */
14 | class AcquireResourceResult extends \Google\Protobuf\Internal\Message
15 | {
16 |
17 | /**
18 | * Constructor.
19 | *
20 | * @param array $data {
21 | * Optional. Data for populating the Message object.
22 | *
23 | * }
24 | */
25 | public function __construct($data = NULL) {
26 | \GPBMetadata\Protos\YdbRateLimiter::initOnce();
27 | parent::__construct($data);
28 | }
29 |
30 | }
31 |
32 |
--------------------------------------------------------------------------------
/protos/Ydb/RateLimiter/AlterResourceResult.php:
--------------------------------------------------------------------------------
1 | Ydb.RateLimiter.AlterResourceResult
13 | */
14 | class AlterResourceResult extends \Google\Protobuf\Internal\Message
15 | {
16 |
17 | /**
18 | * Constructor.
19 | *
20 | * @param array $data {
21 | * Optional. Data for populating the Message object.
22 | *
23 | * }
24 | */
25 | public function __construct($data = NULL) {
26 | \GPBMetadata\Protos\YdbRateLimiter::initOnce();
27 | parent::__construct($data);
28 | }
29 |
30 | }
31 |
32 |
--------------------------------------------------------------------------------
/protos/Ydb/RateLimiter/CreateResourceResult.php:
--------------------------------------------------------------------------------
1 | Ydb.RateLimiter.CreateResourceResult
13 | */
14 | class CreateResourceResult extends \Google\Protobuf\Internal\Message
15 | {
16 |
17 | /**
18 | * Constructor.
19 | *
20 | * @param array $data {
21 | * Optional. Data for populating the Message object.
22 | *
23 | * }
24 | */
25 | public function __construct($data = NULL) {
26 | \GPBMetadata\Protos\YdbRateLimiter::initOnce();
27 | parent::__construct($data);
28 | }
29 |
30 | }
31 |
32 |
--------------------------------------------------------------------------------
/protos/Ydb/RateLimiter/DropResourceResult.php:
--------------------------------------------------------------------------------
1 | Ydb.RateLimiter.DropResourceResult
13 | */
14 | class DropResourceResult extends \Google\Protobuf\Internal\Message
15 | {
16 |
17 | /**
18 | * Constructor.
19 | *
20 | * @param array $data {
21 | * Optional. Data for populating the Message object.
22 | *
23 | * }
24 | */
25 | public function __construct($data = NULL) {
26 | \GPBMetadata\Protos\YdbRateLimiter::initOnce();
27 | parent::__construct($data);
28 | }
29 |
30 | }
31 |
32 |
--------------------------------------------------------------------------------
/protos/Ydb/RateLimiter/ListResourcesResult.php:
--------------------------------------------------------------------------------
1 | Ydb.RateLimiter.ListResourcesResult
13 | */
14 | class ListResourcesResult extends \Google\Protobuf\Internal\Message
15 | {
16 | /**
17 | * Generated from protobuf field repeated string resource_paths = 1;
18 | */
19 | private $resource_paths;
20 |
21 | /**
22 | * Constructor.
23 | *
24 | * @param array $data {
25 | * Optional. Data for populating the Message object.
26 | *
27 | * @type array|\Google\Protobuf\Internal\RepeatedField $resource_paths
28 | * }
29 | */
30 | public function __construct($data = NULL) {
31 | \GPBMetadata\Protos\YdbRateLimiter::initOnce();
32 | parent::__construct($data);
33 | }
34 |
35 | /**
36 | * Generated from protobuf field repeated string resource_paths = 1;
37 | * @return \Google\Protobuf\Internal\RepeatedField
38 | */
39 | public function getResourcePaths()
40 | {
41 | return $this->resource_paths;
42 | }
43 |
44 | /**
45 | * Generated from protobuf field repeated string resource_paths = 1;
46 | * @param array|\Google\Protobuf\Internal\RepeatedField $var
47 | * @return $this
48 | */
49 | public function setResourcePaths($var)
50 | {
51 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
52 | $this->resource_paths = $arr;
53 |
54 | return $this;
55 | }
56 |
57 | }
58 |
59 |
--------------------------------------------------------------------------------
/protos/Ydb/Scheme/DescribePathResult.php:
--------------------------------------------------------------------------------
1 | Ydb.Scheme.DescribePathResult
13 | */
14 | class DescribePathResult extends \Google\Protobuf\Internal\Message
15 | {
16 | /**
17 | * Generated from protobuf field .Ydb.Scheme.Entry self = 1;
18 | */
19 | protected $self = null;
20 |
21 | /**
22 | * Constructor.
23 | *
24 | * @param array $data {
25 | * Optional. Data for populating the Message object.
26 | *
27 | * @type \Ydb\Scheme\Entry $self
28 | * }
29 | */
30 | public function __construct($data = NULL) {
31 | \GPBMetadata\Protos\YdbScheme::initOnce();
32 | parent::__construct($data);
33 | }
34 |
35 | /**
36 | * Generated from protobuf field .Ydb.Scheme.Entry self = 1;
37 | * @return \Ydb\Scheme\Entry|null
38 | */
39 | public function getSelf()
40 | {
41 | return $this->self;
42 | }
43 |
44 | public function hasSelf()
45 | {
46 | return isset($this->self);
47 | }
48 |
49 | public function clearSelf()
50 | {
51 | unset($this->self);
52 | }
53 |
54 | /**
55 | * Generated from protobuf field .Ydb.Scheme.Entry self = 1;
56 | * @param \Ydb\Scheme\Entry $var
57 | * @return $this
58 | */
59 | public function setSelf($var)
60 | {
61 | GPBUtil::checkMessage($var, \Ydb\Scheme\Entry::class);
62 | $this->self = $var;
63 |
64 | return $this;
65 | }
66 |
67 | }
68 |
69 |
--------------------------------------------------------------------------------
/protos/Ydb/Scripting/ExplainYqlRequest/Mode.php:
--------------------------------------------------------------------------------
1 | Ydb.Scripting.ExplainYqlRequest.Mode
11 | */
12 | class Mode
13 | {
14 | /**
15 | * Generated from protobuf enum MODE_UNSPECIFIED = 0;
16 | */
17 | const MODE_UNSPECIFIED = 0;
18 | /**
19 | * PARSE = 1;
20 | *
21 | * Generated from protobuf enum VALIDATE = 2;
22 | */
23 | const VALIDATE = 2;
24 | /**
25 | * Generated from protobuf enum PLAN = 3;
26 | */
27 | const PLAN = 3;
28 |
29 | private static $valueToName = [
30 | self::MODE_UNSPECIFIED => 'MODE_UNSPECIFIED',
31 | self::VALIDATE => 'VALIDATE',
32 | self::PLAN => 'PLAN',
33 | ];
34 |
35 | public static function name($value)
36 | {
37 | if (!isset(self::$valueToName[$value])) {
38 | throw new UnexpectedValueException(sprintf(
39 | 'Enum %s has no name defined for value %s', __CLASS__, $value));
40 | }
41 | return self::$valueToName[$value];
42 | }
43 |
44 |
45 | public static function value($name)
46 | {
47 | $const = __CLASS__ . '::' . strtoupper($name);
48 | if (!defined($const)) {
49 | throw new UnexpectedValueException(sprintf(
50 | 'Enum %s has no value defined for name %s', __CLASS__, $name));
51 | }
52 | return constant($const);
53 | }
54 | }
55 |
56 | // Adding a class alias for backwards compatibility with the previous class name.
57 | class_alias(Mode::class, \Ydb\Scripting\ExplainYqlRequest_Mode::class);
58 |
59 |
--------------------------------------------------------------------------------
/protos/Ydb/StatusIds.php:
--------------------------------------------------------------------------------
1 | Ydb.StatusIds
13 | */
14 | class StatusIds extends \Google\Protobuf\Internal\Message
15 | {
16 |
17 | /**
18 | * Constructor.
19 | *
20 | * @param array $data {
21 | * Optional. Data for populating the Message object.
22 | *
23 | * }
24 | */
25 | public function __construct($data = NULL) {
26 | \GPBMetadata\Protos\YdbStatusCodes::initOnce();
27 | parent::__construct($data);
28 | }
29 |
30 | }
31 |
32 |
--------------------------------------------------------------------------------
/protos/Ydb/StructType.php:
--------------------------------------------------------------------------------
1 | Ydb.StructType
13 | */
14 | class StructType extends \Google\Protobuf\Internal\Message
15 | {
16 | /**
17 | * Generated from protobuf field repeated .Ydb.StructMember members = 1;
18 | */
19 | private $members;
20 |
21 | /**
22 | * Constructor.
23 | *
24 | * @param array $data {
25 | * Optional. Data for populating the Message object.
26 | *
27 | * @type array<\Ydb\StructMember>|\Google\Protobuf\Internal\RepeatedField $members
28 | * }
29 | */
30 | public function __construct($data = NULL) {
31 | \GPBMetadata\Protos\YdbValue::initOnce();
32 | parent::__construct($data);
33 | }
34 |
35 | /**
36 | * Generated from protobuf field repeated .Ydb.StructMember members = 1;
37 | * @return \Google\Protobuf\Internal\RepeatedField
38 | */
39 | public function getMembers()
40 | {
41 | return $this->members;
42 | }
43 |
44 | /**
45 | * Generated from protobuf field repeated .Ydb.StructMember members = 1;
46 | * @param array<\Ydb\StructMember>|\Google\Protobuf\Internal\RepeatedField $var
47 | * @return $this
48 | */
49 | public function setMembers($var)
50 | {
51 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Ydb\StructMember::class);
52 | $this->members = $arr;
53 |
54 | return $this;
55 | }
56 |
57 | }
58 |
59 |
--------------------------------------------------------------------------------
/protos/Ydb/Table/AlterTableResponse.php:
--------------------------------------------------------------------------------
1 | Ydb.Table.AlterTableResponse
13 | */
14 | class AlterTableResponse extends \Google\Protobuf\Internal\Message
15 | {
16 | /**
17 | * Generated from protobuf field .Ydb.Operations.Operation operation = 1;
18 | */
19 | protected $operation = null;
20 |
21 | /**
22 | * Constructor.
23 | *
24 | * @param array $data {
25 | * Optional. Data for populating the Message object.
26 | *
27 | * @type \Ydb\Operations\Operation $operation
28 | * }
29 | */
30 | public function __construct($data = NULL) {
31 | \GPBMetadata\Protos\YdbTable::initOnce();
32 | parent::__construct($data);
33 | }
34 |
35 | /**
36 | * Generated from protobuf field .Ydb.Operations.Operation operation = 1;
37 | * @return \Ydb\Operations\Operation|null
38 | */
39 | public function getOperation()
40 | {
41 | return $this->operation;
42 | }
43 |
44 | public function hasOperation()
45 | {
46 | return isset($this->operation);
47 | }
48 |
49 | public function clearOperation()
50 | {
51 | unset($this->operation);
52 | }
53 |
54 | /**
55 | * Generated from protobuf field .Ydb.Operations.Operation operation = 1;
56 | * @param \Ydb\Operations\Operation $var
57 | * @return $this
58 | */
59 | public function setOperation($var)
60 | {
61 | GPBUtil::checkMessage($var, \Ydb\Operations\Operation::class);
62 | $this->operation = $var;
63 |
64 | return $this;
65 | }
66 |
67 | }
68 |
69 |
--------------------------------------------------------------------------------
/protos/Ydb/Table/BeginTransactionResult.php:
--------------------------------------------------------------------------------
1 | Ydb.Table.BeginTransactionResult
13 | */
14 | class BeginTransactionResult extends \Google\Protobuf\Internal\Message
15 | {
16 | /**
17 | * Generated from protobuf field .Ydb.Table.TransactionMeta tx_meta = 1;
18 | */
19 | protected $tx_meta = null;
20 |
21 | /**
22 | * Constructor.
23 | *
24 | * @param array $data {
25 | * Optional. Data for populating the Message object.
26 | *
27 | * @type \Ydb\Table\TransactionMeta $tx_meta
28 | * }
29 | */
30 | public function __construct($data = NULL) {
31 | \GPBMetadata\Protos\YdbTable::initOnce();
32 | parent::__construct($data);
33 | }
34 |
35 | /**
36 | * Generated from protobuf field .Ydb.Table.TransactionMeta tx_meta = 1;
37 | * @return \Ydb\Table\TransactionMeta|null
38 | */
39 | public function getTxMeta()
40 | {
41 | return $this->tx_meta;
42 | }
43 |
44 | public function hasTxMeta()
45 | {
46 | return isset($this->tx_meta);
47 | }
48 |
49 | public function clearTxMeta()
50 | {
51 | unset($this->tx_meta);
52 | }
53 |
54 | /**
55 | * Generated from protobuf field .Ydb.Table.TransactionMeta tx_meta = 1;
56 | * @param \Ydb\Table\TransactionMeta $var
57 | * @return $this
58 | */
59 | public function setTxMeta($var)
60 | {
61 | GPBUtil::checkMessage($var, \Ydb\Table\TransactionMeta::class);
62 | $this->tx_meta = $var;
63 |
64 | return $this;
65 | }
66 |
67 | }
68 |
69 |
--------------------------------------------------------------------------------
/protos/Ydb/Table/BulkUpsertResponse.php:
--------------------------------------------------------------------------------
1 | Ydb.Table.BulkUpsertResponse
13 | */
14 | class BulkUpsertResponse extends \Google\Protobuf\Internal\Message
15 | {
16 | /**
17 | * Generated from protobuf field .Ydb.Operations.Operation operation = 1;
18 | */
19 | protected $operation = null;
20 |
21 | /**
22 | * Constructor.
23 | *
24 | * @param array $data {
25 | * Optional. Data for populating the Message object.
26 | *
27 | * @type \Ydb\Operations\Operation $operation
28 | * }
29 | */
30 | public function __construct($data = NULL) {
31 | \GPBMetadata\Protos\YdbTable::initOnce();
32 | parent::__construct($data);
33 | }
34 |
35 | /**
36 | * Generated from protobuf field .Ydb.Operations.Operation operation = 1;
37 | * @return \Ydb\Operations\Operation|null
38 | */
39 | public function getOperation()
40 | {
41 | return $this->operation;
42 | }
43 |
44 | public function hasOperation()
45 | {
46 | return isset($this->operation);
47 | }
48 |
49 | public function clearOperation()
50 | {
51 | unset($this->operation);
52 | }
53 |
54 | /**
55 | * Generated from protobuf field .Ydb.Operations.Operation operation = 1;
56 | * @param \Ydb\Operations\Operation $var
57 | * @return $this
58 | */
59 | public function setOperation($var)
60 | {
61 | GPBUtil::checkMessage($var, \Ydb\Operations\Operation::class);
62 | $this->operation = $var;
63 |
64 | return $this;
65 | }
66 |
67 | }
68 |
69 |
--------------------------------------------------------------------------------
/protos/Ydb/Table/BulkUpsertResult.php:
--------------------------------------------------------------------------------
1 | Ydb.Table.BulkUpsertResult
13 | */
14 | class BulkUpsertResult extends \Google\Protobuf\Internal\Message
15 | {
16 |
17 | /**
18 | * Constructor.
19 | *
20 | * @param array $data {
21 | * Optional. Data for populating the Message object.
22 | *
23 | * }
24 | */
25 | public function __construct($data = NULL) {
26 | \GPBMetadata\Protos\YdbTable::initOnce();
27 | parent::__construct($data);
28 | }
29 |
30 | }
31 |
32 |
--------------------------------------------------------------------------------
/protos/Ydb/Table/CachingPolicy.php:
--------------------------------------------------------------------------------
1 | Ydb.Table.CachingPolicy
13 | */
14 | class CachingPolicy extends \Google\Protobuf\Internal\Message
15 | {
16 | /**
17 | * Generated from protobuf field string preset_name = 1;
18 | */
19 | protected $preset_name = '';
20 |
21 | /**
22 | * Constructor.
23 | *
24 | * @param array $data {
25 | * Optional. Data for populating the Message object.
26 | *
27 | * @type string $preset_name
28 | * }
29 | */
30 | public function __construct($data = NULL) {
31 | \GPBMetadata\Protos\YdbTable::initOnce();
32 | parent::__construct($data);
33 | }
34 |
35 | /**
36 | * Generated from protobuf field string preset_name = 1;
37 | * @return string
38 | */
39 | public function getPresetName()
40 | {
41 | return $this->preset_name;
42 | }
43 |
44 | /**
45 | * Generated from protobuf field string preset_name = 1;
46 | * @param string $var
47 | * @return $this
48 | */
49 | public function setPresetName($var)
50 | {
51 | GPBUtil::checkString($var, True);
52 | $this->preset_name = $var;
53 |
54 | return $this;
55 | }
56 |
57 | }
58 |
59 |
--------------------------------------------------------------------------------
/protos/Ydb/Table/ChangefeedDescription/State.php:
--------------------------------------------------------------------------------
1 | Ydb.Table.ChangefeedDescription.State
11 | */
12 | class State
13 | {
14 | /**
15 | * Generated from protobuf enum STATE_UNSPECIFIED = 0;
16 | */
17 | const STATE_UNSPECIFIED = 0;
18 | /**
19 | * Generated from protobuf enum STATE_ENABLED = 1;
20 | */
21 | const STATE_ENABLED = 1;
22 | /**
23 | * Generated from protobuf enum STATE_DISABLED = 2;
24 | */
25 | const STATE_DISABLED = 2;
26 |
27 | private static $valueToName = [
28 | self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED',
29 | self::STATE_ENABLED => 'STATE_ENABLED',
30 | self::STATE_DISABLED => 'STATE_DISABLED',
31 | ];
32 |
33 | public static function name($value)
34 | {
35 | if (!isset(self::$valueToName[$value])) {
36 | throw new UnexpectedValueException(sprintf(
37 | 'Enum %s has no name defined for value %s', __CLASS__, $value));
38 | }
39 | return self::$valueToName[$value];
40 | }
41 |
42 |
43 | public static function value($name)
44 | {
45 | $const = __CLASS__ . '::' . strtoupper($name);
46 | if (!defined($const)) {
47 | throw new UnexpectedValueException(sprintf(
48 | 'Enum %s has no value defined for name %s', __CLASS__, $name));
49 | }
50 | return constant($const);
51 | }
52 | }
53 |
54 | // Adding a class alias for backwards compatibility with the previous class name.
55 | class_alias(State::class, \Ydb\Table\ChangefeedDescription_State::class);
56 |
57 |
--------------------------------------------------------------------------------
/protos/Ydb/Table/ChangefeedFormat.php:
--------------------------------------------------------------------------------
1 | Ydb.Table.ChangefeedFormat
13 | */
14 | class ChangefeedFormat extends \Google\Protobuf\Internal\Message
15 | {
16 |
17 | /**
18 | * Constructor.
19 | *
20 | * @param array $data {
21 | * Optional. Data for populating the Message object.
22 | *
23 | * }
24 | */
25 | public function __construct($data = NULL) {
26 | \GPBMetadata\Protos\YdbTable::initOnce();
27 | parent::__construct($data);
28 | }
29 |
30 | }
31 |
32 |
--------------------------------------------------------------------------------
/protos/Ydb/Table/ChangefeedFormat/Format.php:
--------------------------------------------------------------------------------
1 | Ydb.Table.ChangefeedFormat.Format
11 | */
12 | class Format
13 | {
14 | /**
15 | * Generated from protobuf enum FORMAT_UNSPECIFIED = 0;
16 | */
17 | const FORMAT_UNSPECIFIED = 0;
18 | /**
19 | * Generated from protobuf enum FORMAT_JSON = 1;
20 | */
21 | const FORMAT_JSON = 1;
22 |
23 | private static $valueToName = [
24 | self::FORMAT_UNSPECIFIED => 'FORMAT_UNSPECIFIED',
25 | self::FORMAT_JSON => 'FORMAT_JSON',
26 | ];
27 |
28 | public static function name($value)
29 | {
30 | if (!isset(self::$valueToName[$value])) {
31 | throw new UnexpectedValueException(sprintf(
32 | 'Enum %s has no name defined for value %s', __CLASS__, $value));
33 | }
34 | return self::$valueToName[$value];
35 | }
36 |
37 |
38 | public static function value($name)
39 | {
40 | $const = __CLASS__ . '::' . strtoupper($name);
41 | if (!defined($const)) {
42 | throw new UnexpectedValueException(sprintf(
43 | 'Enum %s has no value defined for name %s', __CLASS__, $name));
44 | }
45 | return constant($const);
46 | }
47 | }
48 |
49 | // Adding a class alias for backwards compatibility with the previous class name.
50 | class_alias(Format::class, \Ydb\Table\ChangefeedFormat_Format::class);
51 |
52 |
--------------------------------------------------------------------------------
/protos/Ydb/Table/ChangefeedMode.php:
--------------------------------------------------------------------------------
1 | Ydb.Table.ChangefeedMode
13 | */
14 | class ChangefeedMode extends \Google\Protobuf\Internal\Message
15 | {
16 |
17 | /**
18 | * Constructor.
19 | *
20 | * @param array $data {
21 | * Optional. Data for populating the Message object.
22 | *
23 | * }
24 | */
25 | public function __construct($data = NULL) {
26 | \GPBMetadata\Protos\YdbTable::initOnce();
27 | parent::__construct($data);
28 | }
29 |
30 | }
31 |
32 |
--------------------------------------------------------------------------------
/protos/Ydb/Table/ColumnFamily/Compression.php:
--------------------------------------------------------------------------------
1 | Ydb.Table.ColumnFamily.Compression
11 | */
12 | class Compression
13 | {
14 | /**
15 | * Generated from protobuf enum COMPRESSION_UNSPECIFIED = 0;
16 | */
17 | const COMPRESSION_UNSPECIFIED = 0;
18 | /**
19 | * Generated from protobuf enum COMPRESSION_NONE = 1;
20 | */
21 | const COMPRESSION_NONE = 1;
22 | /**
23 | * Generated from protobuf enum COMPRESSION_LZ4 = 2;
24 | */
25 | const COMPRESSION_LZ4 = 2;
26 |
27 | private static $valueToName = [
28 | self::COMPRESSION_UNSPECIFIED => 'COMPRESSION_UNSPECIFIED',
29 | self::COMPRESSION_NONE => 'COMPRESSION_NONE',
30 | self::COMPRESSION_LZ4 => 'COMPRESSION_LZ4',
31 | ];
32 |
33 | public static function name($value)
34 | {
35 | if (!isset(self::$valueToName[$value])) {
36 | throw new UnexpectedValueException(sprintf(
37 | 'Enum %s has no name defined for value %s', __CLASS__, $value));
38 | }
39 | return self::$valueToName[$value];
40 | }
41 |
42 |
43 | public static function value($name)
44 | {
45 | $const = __CLASS__ . '::' . strtoupper($name);
46 | if (!defined($const)) {
47 | throw new UnexpectedValueException(sprintf(
48 | 'Enum %s has no value defined for name %s', __CLASS__, $name));
49 | }
50 | return constant($const);
51 | }
52 | }
53 |
54 | // Adding a class alias for backwards compatibility with the previous class name.
55 | class_alias(Compression::class, \Ydb\Table\ColumnFamily_Compression::class);
56 |
57 |
--------------------------------------------------------------------------------
/protos/Ydb/Table/ColumnFamilyPolicy/Compression.php:
--------------------------------------------------------------------------------
1 | Ydb.Table.ColumnFamilyPolicy.Compression
11 | */
12 | class Compression
13 | {
14 | /**
15 | * Generated from protobuf enum COMPRESSION_UNSPECIFIED = 0;
16 | */
17 | const COMPRESSION_UNSPECIFIED = 0;
18 | /**
19 | * Generated from protobuf enum UNCOMPRESSED = 1;
20 | */
21 | const UNCOMPRESSED = 1;
22 | /**
23 | * Generated from protobuf enum COMPRESSED = 2;
24 | */
25 | const COMPRESSED = 2;
26 |
27 | private static $valueToName = [
28 | self::COMPRESSION_UNSPECIFIED => 'COMPRESSION_UNSPECIFIED',
29 | self::UNCOMPRESSED => 'UNCOMPRESSED',
30 | self::COMPRESSED => 'COMPRESSED',
31 | ];
32 |
33 | public static function name($value)
34 | {
35 | if (!isset(self::$valueToName[$value])) {
36 | throw new UnexpectedValueException(sprintf(
37 | 'Enum %s has no name defined for value %s', __CLASS__, $value));
38 | }
39 | return self::$valueToName[$value];
40 | }
41 |
42 |
43 | public static function value($name)
44 | {
45 | $const = __CLASS__ . '::' . strtoupper($name);
46 | if (!defined($const)) {
47 | throw new UnexpectedValueException(sprintf(
48 | 'Enum %s has no value defined for name %s', __CLASS__, $name));
49 | }
50 | return constant($const);
51 | }
52 | }
53 |
54 | // Adding a class alias for backwards compatibility with the previous class name.
55 | class_alias(Compression::class, \Ydb\Table\ColumnFamilyPolicy_Compression::class);
56 |
57 |
--------------------------------------------------------------------------------
/protos/Ydb/Table/CompactionPolicy.php:
--------------------------------------------------------------------------------
1 | Ydb.Table.CompactionPolicy
13 | */
14 | class CompactionPolicy extends \Google\Protobuf\Internal\Message
15 | {
16 | /**
17 | * Generated from protobuf field string preset_name = 1;
18 | */
19 | protected $preset_name = '';
20 |
21 | /**
22 | * Constructor.
23 | *
24 | * @param array $data {
25 | * Optional. Data for populating the Message object.
26 | *
27 | * @type string $preset_name
28 | * }
29 | */
30 | public function __construct($data = NULL) {
31 | \GPBMetadata\Protos\YdbTable::initOnce();
32 | parent::__construct($data);
33 | }
34 |
35 | /**
36 | * Generated from protobuf field string preset_name = 1;
37 | * @return string
38 | */
39 | public function getPresetName()
40 | {
41 | return $this->preset_name;
42 | }
43 |
44 | /**
45 | * Generated from protobuf field string preset_name = 1;
46 | * @param string $var
47 | * @return $this
48 | */
49 | public function setPresetName($var)
50 | {
51 | GPBUtil::checkString($var, True);
52 | $this->preset_name = $var;
53 |
54 | return $this;
55 | }
56 |
57 | }
58 |
59 |
--------------------------------------------------------------------------------
/protos/Ydb/Table/CopyTableResponse.php:
--------------------------------------------------------------------------------
1 | Ydb.Table.CopyTableResponse
13 | */
14 | class CopyTableResponse extends \Google\Protobuf\Internal\Message
15 | {
16 | /**
17 | * Generated from protobuf field .Ydb.Operations.Operation operation = 1;
18 | */
19 | protected $operation = null;
20 |
21 | /**
22 | * Constructor.
23 | *
24 | * @param array $data {
25 | * Optional. Data for populating the Message object.
26 | *
27 | * @type \Ydb\Operations\Operation $operation
28 | * }
29 | */
30 | public function __construct($data = NULL) {
31 | \GPBMetadata\Protos\YdbTable::initOnce();
32 | parent::__construct($data);
33 | }
34 |
35 | /**
36 | * Generated from protobuf field .Ydb.Operations.Operation operation = 1;
37 | * @return \Ydb\Operations\Operation|null
38 | */
39 | public function getOperation()
40 | {
41 | return $this->operation;
42 | }
43 |
44 | public function hasOperation()
45 | {
46 | return isset($this->operation);
47 | }
48 |
49 | public function clearOperation()
50 | {
51 | unset($this->operation);
52 | }
53 |
54 | /**
55 | * Generated from protobuf field .Ydb.Operations.Operation operation = 1;
56 | * @param \Ydb\Operations\Operation $var
57 | * @return $this
58 | */
59 | public function setOperation($var)
60 | {
61 | GPBUtil::checkMessage($var, \Ydb\Operations\Operation::class);
62 | $this->operation = $var;
63 |
64 | return $this;
65 | }
66 |
67 | }
68 |
69 |
--------------------------------------------------------------------------------
/protos/Ydb/Table/CopyTablesResponse.php:
--------------------------------------------------------------------------------
1 | Ydb.Table.CopyTablesResponse
13 | */
14 | class CopyTablesResponse extends \Google\Protobuf\Internal\Message
15 | {
16 | /**
17 | * Generated from protobuf field .Ydb.Operations.Operation operation = 1;
18 | */
19 | protected $operation = null;
20 |
21 | /**
22 | * Constructor.
23 | *
24 | * @param array $data {
25 | * Optional. Data for populating the Message object.
26 | *
27 | * @type \Ydb\Operations\Operation $operation
28 | * }
29 | */
30 | public function __construct($data = NULL) {
31 | \GPBMetadata\Protos\YdbTable::initOnce();
32 | parent::__construct($data);
33 | }
34 |
35 | /**
36 | * Generated from protobuf field .Ydb.Operations.Operation operation = 1;
37 | * @return \Ydb\Operations\Operation|null
38 | */
39 | public function getOperation()
40 | {
41 | return $this->operation;
42 | }
43 |
44 | public function hasOperation()
45 | {
46 | return isset($this->operation);
47 | }
48 |
49 | public function clearOperation()
50 | {
51 | unset($this->operation);
52 | }
53 |
54 | /**
55 | * Generated from protobuf field .Ydb.Operations.Operation operation = 1;
56 | * @param \Ydb\Operations\Operation $var
57 | * @return $this
58 | */
59 | public function setOperation($var)
60 | {
61 | GPBUtil::checkMessage($var, \Ydb\Operations\Operation::class);
62 | $this->operation = $var;
63 |
64 | return $this;
65 | }
66 |
67 | }
68 |
69 |
--------------------------------------------------------------------------------
/protos/Ydb/Table/CreateSessionResult.php:
--------------------------------------------------------------------------------
1 | Ydb.Table.CreateSessionResult
13 | */
14 | class CreateSessionResult extends \Google\Protobuf\Internal\Message
15 | {
16 | /**
17 | * Session identifier
18 | *
19 | * Generated from protobuf field string session_id = 1;
20 | */
21 | protected $session_id = '';
22 |
23 | /**
24 | * Constructor.
25 | *
26 | * @param array $data {
27 | * Optional. Data for populating the Message object.
28 | *
29 | * @type string $session_id
30 | * Session identifier
31 | * }
32 | */
33 | public function __construct($data = NULL) {
34 | \GPBMetadata\Protos\YdbTable::initOnce();
35 | parent::__construct($data);
36 | }
37 |
38 | /**
39 | * Session identifier
40 | *
41 | * Generated from protobuf field string session_id = 1;
42 | * @return string
43 | */
44 | public function getSessionId()
45 | {
46 | return $this->session_id;
47 | }
48 |
49 | /**
50 | * Session identifier
51 | *
52 | * Generated from protobuf field string session_id = 1;
53 | * @param string $var
54 | * @return $this
55 | */
56 | public function setSessionId($var)
57 | {
58 | GPBUtil::checkString($var, True);
59 | $this->session_id = $var;
60 |
61 | return $this;
62 | }
63 |
64 | }
65 |
66 |
--------------------------------------------------------------------------------
/protos/Ydb/Table/CreateTableResponse.php:
--------------------------------------------------------------------------------
1 | Ydb.Table.CreateTableResponse
13 | */
14 | class CreateTableResponse extends \Google\Protobuf\Internal\Message
15 | {
16 | /**
17 | * Generated from protobuf field .Ydb.Operations.Operation operation = 1;
18 | */
19 | protected $operation = null;
20 |
21 | /**
22 | * Constructor.
23 | *
24 | * @param array $data {
25 | * Optional. Data for populating the Message object.
26 | *
27 | * @type \Ydb\Operations\Operation $operation
28 | * }
29 | */
30 | public function __construct($data = NULL) {
31 | \GPBMetadata\Protos\YdbTable::initOnce();
32 | parent::__construct($data);
33 | }
34 |
35 | /**
36 | * Generated from protobuf field .Ydb.Operations.Operation operation = 1;
37 | * @return \Ydb\Operations\Operation|null
38 | */
39 | public function getOperation()
40 | {
41 | return $this->operation;
42 | }
43 |
44 | public function hasOperation()
45 | {
46 | return isset($this->operation);
47 | }
48 |
49 | public function clearOperation()
50 | {
51 | unset($this->operation);
52 | }
53 |
54 | /**
55 | * Generated from protobuf field .Ydb.Operations.Operation operation = 1;
56 | * @param \Ydb\Operations\Operation $var
57 | * @return $this
58 | */
59 | public function setOperation($var)
60 | {
61 | GPBUtil::checkMessage($var, \Ydb\Operations\Operation::class);
62 | $this->operation = $var;
63 |
64 | return $this;
65 | }
66 |
67 | }
68 |
69 |
--------------------------------------------------------------------------------
/protos/Ydb/Table/DropTableResponse.php:
--------------------------------------------------------------------------------
1 | Ydb.Table.DropTableResponse
13 | */
14 | class DropTableResponse extends \Google\Protobuf\Internal\Message
15 | {
16 | /**
17 | * Generated from protobuf field .Ydb.Operations.Operation operation = 1;
18 | */
19 | protected $operation = null;
20 |
21 | /**
22 | * Constructor.
23 | *
24 | * @param array $data {
25 | * Optional. Data for populating the Message object.
26 | *
27 | * @type \Ydb\Operations\Operation $operation
28 | * }
29 | */
30 | public function __construct($data = NULL) {
31 | \GPBMetadata\Protos\YdbTable::initOnce();
32 | parent::__construct($data);
33 | }
34 |
35 | /**
36 | * Generated from protobuf field .Ydb.Operations.Operation operation = 1;
37 | * @return \Ydb\Operations\Operation|null
38 | */
39 | public function getOperation()
40 | {
41 | return $this->operation;
42 | }
43 |
44 | public function hasOperation()
45 | {
46 | return isset($this->operation);
47 | }
48 |
49 | public function clearOperation()
50 | {
51 | unset($this->operation);
52 | }
53 |
54 | /**
55 | * Generated from protobuf field .Ydb.Operations.Operation operation = 1;
56 | * @param \Ydb\Operations\Operation $var
57 | * @return $this
58 | */
59 | public function setOperation($var)
60 | {
61 | GPBUtil::checkMessage($var, \Ydb\Operations\Operation::class);
62 | $this->operation = $var;
63 |
64 | return $this;
65 | }
66 |
67 | }
68 |
69 |
--------------------------------------------------------------------------------
/protos/Ydb/Table/ExecuteScanQueryRequest/Mode.php:
--------------------------------------------------------------------------------
1 | Ydb.Table.ExecuteScanQueryRequest.Mode
11 | */
12 | class Mode
13 | {
14 | /**
15 | * Generated from protobuf enum MODE_UNSPECIFIED = 0;
16 | */
17 | const MODE_UNSPECIFIED = 0;
18 | /**
19 | * Generated from protobuf enum MODE_EXPLAIN = 1;
20 | */
21 | const MODE_EXPLAIN = 1;
22 | /**
23 | * MODE_PREPARE = 2;
24 | *
25 | * Generated from protobuf enum MODE_EXEC = 3;
26 | */
27 | const MODE_EXEC = 3;
28 |
29 | private static $valueToName = [
30 | self::MODE_UNSPECIFIED => 'MODE_UNSPECIFIED',
31 | self::MODE_EXPLAIN => 'MODE_EXPLAIN',
32 | self::MODE_EXEC => 'MODE_EXEC',
33 | ];
34 |
35 | public static function name($value)
36 | {
37 | if (!isset(self::$valueToName[$value])) {
38 | throw new UnexpectedValueException(sprintf(
39 | 'Enum %s has no name defined for value %s', __CLASS__, $value));
40 | }
41 | return self::$valueToName[$value];
42 | }
43 |
44 |
45 | public static function value($name)
46 | {
47 | $const = __CLASS__ . '::' . strtoupper($name);
48 | if (!defined($const)) {
49 | throw new UnexpectedValueException(sprintf(
50 | 'Enum %s has no value defined for name %s', __CLASS__, $name));
51 | }
52 | return constant($const);
53 | }
54 | }
55 |
56 | // Adding a class alias for backwards compatibility with the previous class name.
57 | class_alias(Mode::class, \Ydb\Table\ExecuteScanQueryRequest_Mode::class);
58 |
59 |
--------------------------------------------------------------------------------
/protos/Ydb/Table/ExecutionPolicy.php:
--------------------------------------------------------------------------------
1 | Ydb.Table.ExecutionPolicy
13 | */
14 | class ExecutionPolicy extends \Google\Protobuf\Internal\Message
15 | {
16 | /**
17 | * Generated from protobuf field string preset_name = 1;
18 | */
19 | protected $preset_name = '';
20 |
21 | /**
22 | * Constructor.
23 | *
24 | * @param array $data {
25 | * Optional. Data for populating the Message object.
26 | *
27 | * @type string $preset_name
28 | * }
29 | */
30 | public function __construct($data = NULL) {
31 | \GPBMetadata\Protos\YdbTable::initOnce();
32 | parent::__construct($data);
33 | }
34 |
35 | /**
36 | * Generated from protobuf field string preset_name = 1;
37 | * @return string
38 | */
39 | public function getPresetName()
40 | {
41 | return $this->preset_name;
42 | }
43 |
44 | /**
45 | * Generated from protobuf field string preset_name = 1;
46 | * @param string $var
47 | * @return $this
48 | */
49 | public function setPresetName($var)
50 | {
51 | GPBUtil::checkString($var, True);
52 | $this->preset_name = $var;
53 |
54 | return $this;
55 | }
56 |
57 | }
58 |
59 |
--------------------------------------------------------------------------------
/protos/Ydb/Table/GlobalAsyncIndex.php:
--------------------------------------------------------------------------------
1 | Ydb.Table.GlobalAsyncIndex
13 | */
14 | class GlobalAsyncIndex extends \Google\Protobuf\Internal\Message
15 | {
16 |
17 | /**
18 | * Constructor.
19 | *
20 | * @param array $data {
21 | * Optional. Data for populating the Message object.
22 | *
23 | * }
24 | */
25 | public function __construct($data = NULL) {
26 | \GPBMetadata\Protos\YdbTable::initOnce();
27 | parent::__construct($data);
28 | }
29 |
30 | }
31 |
32 |
--------------------------------------------------------------------------------
/protos/Ydb/Table/GlobalIndex.php:
--------------------------------------------------------------------------------
1 | Ydb.Table.GlobalIndex
13 | */
14 | class GlobalIndex extends \Google\Protobuf\Internal\Message
15 | {
16 |
17 | /**
18 | * Constructor.
19 | *
20 | * @param array $data {
21 | * Optional. Data for populating the Message object.
22 | *
23 | * }
24 | */
25 | public function __construct($data = NULL) {
26 | \GPBMetadata\Protos\YdbTable::initOnce();
27 | parent::__construct($data);
28 | }
29 |
30 | }
31 |
32 |
--------------------------------------------------------------------------------
/protos/Ydb/Table/IndexBuildState.php:
--------------------------------------------------------------------------------
1 | Ydb.Table.IndexBuildState
15 | */
16 | class IndexBuildState extends \Google\Protobuf\Internal\Message
17 | {
18 |
19 | /**
20 | * Constructor.
21 | *
22 | * @param array $data {
23 | * Optional. Data for populating the Message object.
24 | *
25 | * }
26 | */
27 | public function __construct($data = NULL) {
28 | \GPBMetadata\Protos\YdbTable::initOnce();
29 | parent::__construct($data);
30 | }
31 |
32 | }
33 |
34 |
--------------------------------------------------------------------------------
/protos/Ydb/Table/KeepAliveResponse.php:
--------------------------------------------------------------------------------
1 | Ydb.Table.KeepAliveResponse
13 | */
14 | class KeepAliveResponse extends \Google\Protobuf\Internal\Message
15 | {
16 | /**
17 | * Generated from protobuf field .Ydb.Operations.Operation operation = 1;
18 | */
19 | protected $operation = null;
20 |
21 | /**
22 | * Constructor.
23 | *
24 | * @param array $data {
25 | * Optional. Data for populating the Message object.
26 | *
27 | * @type \Ydb\Operations\Operation $operation
28 | * }
29 | */
30 | public function __construct($data = NULL) {
31 | \GPBMetadata\Protos\YdbTable::initOnce();
32 | parent::__construct($data);
33 | }
34 |
35 | /**
36 | * Generated from protobuf field .Ydb.Operations.Operation operation = 1;
37 | * @return \Ydb\Operations\Operation|null
38 | */
39 | public function getOperation()
40 | {
41 | return $this->operation;
42 | }
43 |
44 | public function hasOperation()
45 | {
46 | return isset($this->operation);
47 | }
48 |
49 | public function clearOperation()
50 | {
51 | unset($this->operation);
52 | }
53 |
54 | /**
55 | * Generated from protobuf field .Ydb.Operations.Operation operation = 1;
56 | * @param \Ydb\Operations\Operation $var
57 | * @return $this
58 | */
59 | public function setOperation($var)
60 | {
61 | GPBUtil::checkMessage($var, \Ydb\Operations\Operation::class);
62 | $this->operation = $var;
63 |
64 | return $this;
65 | }
66 |
67 | }
68 |
69 |
--------------------------------------------------------------------------------
/protos/Ydb/Table/KeepAliveResult.php:
--------------------------------------------------------------------------------
1 | Ydb.Table.KeepAliveResult
13 | */
14 | class KeepAliveResult extends \Google\Protobuf\Internal\Message
15 | {
16 | /**
17 | * Generated from protobuf field .Ydb.Table.KeepAliveResult.SessionStatus session_status = 1;
18 | */
19 | protected $session_status = 0;
20 |
21 | /**
22 | * Constructor.
23 | *
24 | * @param array $data {
25 | * Optional. Data for populating the Message object.
26 | *
27 | * @type int $session_status
28 | * }
29 | */
30 | public function __construct($data = NULL) {
31 | \GPBMetadata\Protos\YdbTable::initOnce();
32 | parent::__construct($data);
33 | }
34 |
35 | /**
36 | * Generated from protobuf field .Ydb.Table.KeepAliveResult.SessionStatus session_status = 1;
37 | * @return int
38 | */
39 | public function getSessionStatus()
40 | {
41 | return $this->session_status;
42 | }
43 |
44 | /**
45 | * Generated from protobuf field .Ydb.Table.KeepAliveResult.SessionStatus session_status = 1;
46 | * @param int $var
47 | * @return $this
48 | */
49 | public function setSessionStatus($var)
50 | {
51 | GPBUtil::checkEnum($var, \Ydb\Table\KeepAliveResult\SessionStatus::class);
52 | $this->session_status = $var;
53 |
54 | return $this;
55 | }
56 |
57 | }
58 |
59 |
--------------------------------------------------------------------------------
/protos/Ydb/Table/OnlineModeSettings.php:
--------------------------------------------------------------------------------
1 | Ydb.Table.OnlineModeSettings
13 | */
14 | class OnlineModeSettings extends \Google\Protobuf\Internal\Message
15 | {
16 | /**
17 | * Generated from protobuf field bool allow_inconsistent_reads = 1;
18 | */
19 | protected $allow_inconsistent_reads = false;
20 |
21 | /**
22 | * Constructor.
23 | *
24 | * @param array $data {
25 | * Optional. Data for populating the Message object.
26 | *
27 | * @type bool $allow_inconsistent_reads
28 | * }
29 | */
30 | public function __construct($data = NULL) {
31 | \GPBMetadata\Protos\YdbTable::initOnce();
32 | parent::__construct($data);
33 | }
34 |
35 | /**
36 | * Generated from protobuf field bool allow_inconsistent_reads = 1;
37 | * @return bool
38 | */
39 | public function getAllowInconsistentReads()
40 | {
41 | return $this->allow_inconsistent_reads;
42 | }
43 |
44 | /**
45 | * Generated from protobuf field bool allow_inconsistent_reads = 1;
46 | * @param bool $var
47 | * @return $this
48 | */
49 | public function setAllowInconsistentReads($var)
50 | {
51 | GPBUtil::checkBool($var);
52 | $this->allow_inconsistent_reads = $var;
53 |
54 | return $this;
55 | }
56 |
57 | }
58 |
59 |
--------------------------------------------------------------------------------
/protos/Ydb/Table/QueryCachePolicy.php:
--------------------------------------------------------------------------------
1 | Ydb.Table.QueryCachePolicy
13 | */
14 | class QueryCachePolicy extends \Google\Protobuf\Internal\Message
15 | {
16 | /**
17 | * Generated from protobuf field bool keep_in_cache = 1;
18 | */
19 | protected $keep_in_cache = false;
20 |
21 | /**
22 | * Constructor.
23 | *
24 | * @param array $data {
25 | * Optional. Data for populating the Message object.
26 | *
27 | * @type bool $keep_in_cache
28 | * }
29 | */
30 | public function __construct($data = NULL) {
31 | \GPBMetadata\Protos\YdbTable::initOnce();
32 | parent::__construct($data);
33 | }
34 |
35 | /**
36 | * Generated from protobuf field bool keep_in_cache = 1;
37 | * @return bool
38 | */
39 | public function getKeepInCache()
40 | {
41 | return $this->keep_in_cache;
42 | }
43 |
44 | /**
45 | * Generated from protobuf field bool keep_in_cache = 1;
46 | * @param bool $var
47 | * @return $this
48 | */
49 | public function setKeepInCache($var)
50 | {
51 | GPBUtil::checkBool($var);
52 | $this->keep_in_cache = $var;
53 |
54 | return $this;
55 | }
56 |
57 | }
58 |
59 |
--------------------------------------------------------------------------------
/protos/Ydb/Table/QueryStatsCollection.php:
--------------------------------------------------------------------------------
1 | Ydb.Table.QueryStatsCollection
15 | */
16 | class QueryStatsCollection extends \Google\Protobuf\Internal\Message
17 | {
18 |
19 | /**
20 | * Constructor.
21 | *
22 | * @param array $data {
23 | * Optional. Data for populating the Message object.
24 | *
25 | * }
26 | */
27 | public function __construct($data = NULL) {
28 | \GPBMetadata\Protos\YdbTable::initOnce();
29 | parent::__construct($data);
30 | }
31 |
32 | }
33 |
34 |
--------------------------------------------------------------------------------
/protos/Ydb/Table/SerializableModeSettings.php:
--------------------------------------------------------------------------------
1 | Ydb.Table.SerializableModeSettings
13 | */
14 | class SerializableModeSettings extends \Google\Protobuf\Internal\Message
15 | {
16 |
17 | /**
18 | * Constructor.
19 | *
20 | * @param array $data {
21 | * Optional. Data for populating the Message object.
22 | *
23 | * }
24 | */
25 | public function __construct($data = NULL) {
26 | \GPBMetadata\Protos\YdbTable::initOnce();
27 | parent::__construct($data);
28 | }
29 |
30 | }
31 |
32 |
--------------------------------------------------------------------------------
/protos/Ydb/Table/SnapshotModeSettings.php:
--------------------------------------------------------------------------------
1 | Ydb.Table.SnapshotModeSettings
13 | */
14 | class SnapshotModeSettings extends \Google\Protobuf\Internal\Message
15 | {
16 |
17 | /**
18 | * Constructor.
19 | *
20 | * @param array $data {
21 | * Optional. Data for populating the Message object.
22 | *
23 | * }
24 | */
25 | public function __construct($data = NULL) {
26 | \GPBMetadata\Protos\YdbTable::initOnce();
27 | parent::__construct($data);
28 | }
29 |
30 | }
31 |
32 |
--------------------------------------------------------------------------------
/protos/Ydb/Table/StaleModeSettings.php:
--------------------------------------------------------------------------------
1 | Ydb.Table.StaleModeSettings
13 | */
14 | class StaleModeSettings extends \Google\Protobuf\Internal\Message
15 | {
16 |
17 | /**
18 | * Constructor.
19 | *
20 | * @param array $data {
21 | * Optional. Data for populating the Message object.
22 | *
23 | * }
24 | */
25 | public function __construct($data = NULL) {
26 | \GPBMetadata\Protos\YdbTable::initOnce();
27 | parent::__construct($data);
28 | }
29 |
30 | }
31 |
32 |
--------------------------------------------------------------------------------
/protos/Ydb/Table/StoragePool.php:
--------------------------------------------------------------------------------
1 | Ydb.Table.StoragePool
13 | */
14 | class StoragePool extends \Google\Protobuf\Internal\Message
15 | {
16 | /**
17 | * Generated from protobuf field string media = 1;
18 | */
19 | protected $media = '';
20 |
21 | /**
22 | * Constructor.
23 | *
24 | * @param array $data {
25 | * Optional. Data for populating the Message object.
26 | *
27 | * @type string $media
28 | * }
29 | */
30 | public function __construct($data = NULL) {
31 | \GPBMetadata\Protos\YdbTable::initOnce();
32 | parent::__construct($data);
33 | }
34 |
35 | /**
36 | * Generated from protobuf field string media = 1;
37 | * @return string
38 | */
39 | public function getMedia()
40 | {
41 | return $this->media;
42 | }
43 |
44 | /**
45 | * Generated from protobuf field string media = 1;
46 | * @param string $var
47 | * @return $this
48 | */
49 | public function setMedia($var)
50 | {
51 | GPBUtil::checkString($var, True);
52 | $this->media = $var;
53 |
54 | return $this;
55 | }
56 |
57 | }
58 |
59 |
--------------------------------------------------------------------------------
/protos/Ydb/Table/TransactionMeta.php:
--------------------------------------------------------------------------------
1 | Ydb.Table.TransactionMeta
15 | */
16 | class TransactionMeta extends \Google\Protobuf\Internal\Message
17 | {
18 | /**
19 | * Transaction identifier
20 | *
21 | * Generated from protobuf field string id = 1;
22 | */
23 | protected $id = '';
24 |
25 | /**
26 | * Constructor.
27 | *
28 | * @param array $data {
29 | * Optional. Data for populating the Message object.
30 | *
31 | * @type string $id
32 | * Transaction identifier
33 | * }
34 | */
35 | public function __construct($data = NULL) {
36 | \GPBMetadata\Protos\YdbTable::initOnce();
37 | parent::__construct($data);
38 | }
39 |
40 | /**
41 | * Transaction identifier
42 | *
43 | * Generated from protobuf field string id = 1;
44 | * @return string
45 | */
46 | public function getId()
47 | {
48 | return $this->id;
49 | }
50 |
51 | /**
52 | * Transaction identifier
53 | *
54 | * Generated from protobuf field string id = 1;
55 | * @param string $var
56 | * @return $this
57 | */
58 | public function setId($var)
59 | {
60 | GPBUtil::checkString($var, True);
61 | $this->id = $var;
62 |
63 | return $this;
64 | }
65 |
66 | }
67 |
68 |
--------------------------------------------------------------------------------
/protos/Ydb/Topic/AddOffsetsToTransactionResult.php:
--------------------------------------------------------------------------------
1 | Ydb.Topic.AddOffsetsToTransactionResult
15 | */
16 | class AddOffsetsToTransactionResult extends \Google\Protobuf\Internal\Message
17 | {
18 |
19 | /**
20 | * Constructor.
21 | *
22 | * @param array $data {
23 | * Optional. Data for populating the Message object.
24 | *
25 | * }
26 | */
27 | public function __construct($data = NULL) {
28 | \GPBMetadata\Protos\YdbTopic::initOnce();
29 | parent::__construct($data);
30 | }
31 |
32 | }
33 |
34 |
--------------------------------------------------------------------------------
/protos/Ydb/Topic/AlterTopicResult.php:
--------------------------------------------------------------------------------
1 | Ydb.Topic.AlterTopicResult
15 | */
16 | class AlterTopicResult extends \Google\Protobuf\Internal\Message
17 | {
18 |
19 | /**
20 | * Constructor.
21 | *
22 | * @param array $data {
23 | * Optional. Data for populating the Message object.
24 | *
25 | * }
26 | */
27 | public function __construct($data = NULL) {
28 | \GPBMetadata\Protos\YdbTopic::initOnce();
29 | parent::__construct($data);
30 | }
31 |
32 | }
33 |
34 |
--------------------------------------------------------------------------------
/protos/Ydb/Topic/CreateTopicResult.php:
--------------------------------------------------------------------------------
1 | Ydb.Topic.CreateTopicResult
15 | */
16 | class CreateTopicResult extends \Google\Protobuf\Internal\Message
17 | {
18 |
19 | /**
20 | * Constructor.
21 | *
22 | * @param array $data {
23 | * Optional. Data for populating the Message object.
24 | *
25 | * }
26 | */
27 | public function __construct($data = NULL) {
28 | \GPBMetadata\Protos\YdbTopic::initOnce();
29 | parent::__construct($data);
30 | }
31 |
32 | }
33 |
34 |
--------------------------------------------------------------------------------
/protos/Ydb/Topic/DropTopicResult.php:
--------------------------------------------------------------------------------
1 | Ydb.Topic.DropTopicResult
15 | */
16 | class DropTopicResult extends \Google\Protobuf\Internal\Message
17 | {
18 |
19 | /**
20 | * Constructor.
21 | *
22 | * @param array $data {
23 | * Optional. Data for populating the Message object.
24 | *
25 | * }
26 | */
27 | public function __construct($data = NULL) {
28 | \GPBMetadata\Protos\YdbTopic::initOnce();
29 | parent::__construct($data);
30 | }
31 |
32 | }
33 |
34 |
--------------------------------------------------------------------------------
/protos/Ydb/Topic/StreamReadMessage.php:
--------------------------------------------------------------------------------
1 | Ydb.Topic.StreamReadMessage
15 | */
16 | class StreamReadMessage extends \Google\Protobuf\Internal\Message
17 | {
18 |
19 | /**
20 | * Constructor.
21 | *
22 | * @param array $data {
23 | * Optional. Data for populating the Message object.
24 | *
25 | * }
26 | */
27 | public function __construct($data = NULL) {
28 | \GPBMetadata\Protos\YdbTopic::initOnce();
29 | parent::__construct($data);
30 | }
31 |
32 | }
33 |
34 |
--------------------------------------------------------------------------------
/protos/Ydb/Topic/StreamWriteMessage.php:
--------------------------------------------------------------------------------
1 | Ydb.Topic.StreamWriteMessage
15 | */
16 | class StreamWriteMessage extends \Google\Protobuf\Internal\Message
17 | {
18 |
19 | /**
20 | * Constructor.
21 | *
22 | * @param array $data {
23 | * Optional. Data for populating the Message object.
24 | *
25 | * }
26 | */
27 | public function __construct($data = NULL) {
28 | \GPBMetadata\Protos\YdbTopic::initOnce();
29 | parent::__construct($data);
30 | }
31 |
32 | }
33 |
34 |
--------------------------------------------------------------------------------
/protos/Ydb/Topic/StreamWriteMessage/WriteResponse/WriteAck/Skipped/Reason.php:
--------------------------------------------------------------------------------
1 | Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.Skipped.Reason
11 | */
12 | class Reason
13 | {
14 | /**
15 | * Generated from protobuf enum REASON_UNSPECIFIED = 0;
16 | */
17 | const REASON_UNSPECIFIED = 0;
18 | /**
19 | * Generated from protobuf enum REASON_ALREADY_WRITTEN = 1;
20 | */
21 | const REASON_ALREADY_WRITTEN = 1;
22 |
23 | private static $valueToName = [
24 | self::REASON_UNSPECIFIED => 'REASON_UNSPECIFIED',
25 | self::REASON_ALREADY_WRITTEN => 'REASON_ALREADY_WRITTEN',
26 | ];
27 |
28 | public static function name($value)
29 | {
30 | if (!isset(self::$valueToName[$value])) {
31 | throw new UnexpectedValueException(sprintf(
32 | 'Enum %s has no name defined for value %s', __CLASS__, $value));
33 | }
34 | return self::$valueToName[$value];
35 | }
36 |
37 |
38 | public static function value($name)
39 | {
40 | $const = __CLASS__ . '::' . strtoupper($name);
41 | if (!defined($const)) {
42 | throw new UnexpectedValueException(sprintf(
43 | 'Enum %s has no value defined for name %s', __CLASS__, $name));
44 | }
45 | return constant($const);
46 | }
47 | }
48 |
49 | // Adding a class alias for backwards compatibility with the previous class name.
50 | class_alias(Reason::class, \Ydb\Topic\StreamWriteMessage_WriteResponse_WriteAck_Skipped_Reason::class);
51 |
52 |
--------------------------------------------------------------------------------
/protos/Ydb/Topic/UpdateTokenRequest.php:
--------------------------------------------------------------------------------
1 | Ydb.Topic.UpdateTokenRequest
16 | */
17 | class UpdateTokenRequest extends \Google\Protobuf\Internal\Message
18 | {
19 | /**
20 | * Generated from protobuf field string token = 1;
21 | */
22 | protected $token = '';
23 |
24 | /**
25 | * Constructor.
26 | *
27 | * @param array $data {
28 | * Optional. Data for populating the Message object.
29 | *
30 | * @type string $token
31 | * }
32 | */
33 | public function __construct($data = NULL) {
34 | \GPBMetadata\Protos\YdbTopic::initOnce();
35 | parent::__construct($data);
36 | }
37 |
38 | /**
39 | * Generated from protobuf field string token = 1;
40 | * @return string
41 | */
42 | public function getToken()
43 | {
44 | return $this->token;
45 | }
46 |
47 | /**
48 | * Generated from protobuf field string token = 1;
49 | * @param string $var
50 | * @return $this
51 | */
52 | public function setToken($var)
53 | {
54 | GPBUtil::checkString($var, True);
55 | $this->token = $var;
56 |
57 | return $this;
58 | }
59 |
60 | }
61 |
62 |
--------------------------------------------------------------------------------
/protos/Ydb/Topic/UpdateTokenResponse.php:
--------------------------------------------------------------------------------
1 | Ydb.Topic.UpdateTokenResponse
13 | */
14 | class UpdateTokenResponse extends \Google\Protobuf\Internal\Message
15 | {
16 |
17 | /**
18 | * Constructor.
19 | *
20 | * @param array $data {
21 | * Optional. Data for populating the Message object.
22 | *
23 | * }
24 | */
25 | public function __construct($data = NULL) {
26 | \GPBMetadata\Protos\YdbTopic::initOnce();
27 | parent::__construct($data);
28 | }
29 |
30 | }
31 |
32 |
--------------------------------------------------------------------------------
/protos/Ydb/TupleType.php:
--------------------------------------------------------------------------------
1 | Ydb.TupleType
13 | */
14 | class TupleType extends \Google\Protobuf\Internal\Message
15 | {
16 | /**
17 | * Generated from protobuf field repeated .Ydb.Type elements = 1;
18 | */
19 | private $elements;
20 |
21 | /**
22 | * Constructor.
23 | *
24 | * @param array $data {
25 | * Optional. Data for populating the Message object.
26 | *
27 | * @type array<\Ydb\Type>|\Google\Protobuf\Internal\RepeatedField $elements
28 | * }
29 | */
30 | public function __construct($data = NULL) {
31 | \GPBMetadata\Protos\YdbValue::initOnce();
32 | parent::__construct($data);
33 | }
34 |
35 | /**
36 | * Generated from protobuf field repeated .Ydb.Type elements = 1;
37 | * @return \Google\Protobuf\Internal\RepeatedField
38 | */
39 | public function getElements()
40 | {
41 | return $this->elements;
42 | }
43 |
44 | /**
45 | * Generated from protobuf field repeated .Ydb.Type elements = 1;
46 | * @param array<\Ydb\Type>|\Google\Protobuf\Internal\RepeatedField $var
47 | * @return $this
48 | */
49 | public function setElements($var)
50 | {
51 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Ydb\Type::class);
52 | $this->elements = $arr;
53 |
54 | return $this;
55 | }
56 |
57 | }
58 |
59 |
--------------------------------------------------------------------------------
/slo-workload/.gitignore:
--------------------------------------------------------------------------------
1 | composer.lock
2 | ./vendor
3 | .idea
4 |
--------------------------------------------------------------------------------
/slo-workload/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM ilyakharev/php-grpc:7.2
2 |
3 | COPY . /src
4 | WORKDIR /src/slo-workload
5 | RUN composer update
6 | #RUN apt update; apt install htop
7 | ENTRYPOINT ["php", "application.php"]
8 |
--------------------------------------------------------------------------------
/slo-workload/application.php:
--------------------------------------------------------------------------------
1 | new \YdbPlatform\Ydb\Slo\Commands\CreateCommand(),
8 | "run" =>new \YdbPlatform\Ydb\Slo\Commands\RunCommand(),
9 | "cleanup" =>new \YdbPlatform\Ydb\Slo\Commands\CleanupCommand()
10 | ];
11 |
12 | if ($argc == 1 || !isset($commands[$argv[1]])){
13 | echo "Commands:\n";
14 | foreach ($commands as $name=>$command) {
15 | echo "- ".$name."\t"."- ".$command->description."\n";
16 | }
17 | exit(0);
18 | }
19 |
20 | if ($argc<4||substr($argv[2],0,4)!="grpc" || substr($argv[3],0,1)!="/"){
21 | echo $commands[$argv[1]]->help;
22 | exit(0);
23 | }
24 |
25 | $data = $commands[$argv[1]]->generateOptions(array_slice($argv, 4));
26 |
27 | $command = $commands[$argv[1]];
28 |
29 | $commands[$argv[1]]->execute($argv[2],$argv[3], $data);
30 |
--------------------------------------------------------------------------------
/slo-workload/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ydb-platform/ydb-php-slo",
3 | "description": "YDB PHP SDK",
4 | "license": "Apache-2.0",
5 | "authors": [
6 | {
7 | "name": "Ilia Kharev",
8 | "email": "ilyakharev@ydb.tech"
9 | }
10 | ],
11 | "repositories": [
12 | {
13 | "type": "path",
14 | "url": "./../"
15 | }
16 | ],
17 | "require": {
18 | "ydb-platform/ydb-php-sdk": "@dev",
19 | "promphp/prometheus_push_gateway_php": "^v1.0.1",
20 | "ext-sysvmsg": "*"
21 | },
22 | "autoload": {
23 | "psr-4": {
24 | "YdbPlatform\\Ydb\\Slo\\": "src/"
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/slo-workload/php-grpc.Dockerfile:
--------------------------------------------------------------------------------
1 | FROM ubuntu:20.04
2 | LABEL authors="ilyakharev"
3 |
4 | RUN apt-get upgrade
5 | RUN apt-get update
6 | RUN apt-get install -y software-properties-common
7 | RUN apt-get update
8 | RUN add-apt-repository -y ppa:ondrej/php
9 | RUN apt-get update
10 | RUN apt-get install -y libz-dev
11 | RUN apt-get update
12 | RUN apt-get install -y php7.2-fpm php7.2-cli php7.2-curl php7.2-json php-pear php7.2-dev php7.2-bcmath
13 | RUN apt-get install -y php7.2-xml
14 | RUN apt-get update
15 | RUN curl -sS https://getcomposer.org/installer | php
16 | RUN mv composer.phar /usr/local/bin/composer
17 | RUN pecl install grpc-1.45.0
18 | RUN echo "extension=grpc.so" >> /etc/php/7.2/cli/php.ini
19 | RUN apt-get install --fix-missing -y git
20 | RUN echo "grpc.enable_fork_support = 1" >> /etc/php/7.2/cli/php.ini
21 | RUN echo "grpc.poll_strategy = poll" >> /etc/php/7.2/cli/php.ini
22 |
--------------------------------------------------------------------------------
/slo-workload/src/Command.php:
--------------------------------------------------------------------------------
1 | options as $opt) {
23 | if (in_array($arg, $opt["alias"])) {
24 | $option = $opt;
25 | break;
26 | }
27 | }
28 | if ($option) {
29 | $result[$opt["alias"][0]] = $args[$i + 1];
30 | }
31 | }
32 | return $result;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/slo-workload/src/DataGenerator.php:
--------------------------------------------------------------------------------
1 | currentObjectId;
23 | }
24 |
25 | public function getRandomId()
26 | {
27 | return round(lcg_value() * $this->currentObjectId);
28 | }
29 | public function getUpsertData()
30 | {
31 | $this->currentObjectId++;
32 | return [
33 | "\$id" => (new Uint64Type($this->currentObjectId))->toTypedValue(),
34 | "\$payload_str" => (new Utf8Type($this->generateRandomString()))->toTypedValue(),
35 | "\$payload_double" => (new DoubleType(lcg_value()))->toTypedValue(),
36 | "\$payload_timestamp" => (new TimestampType(time()))->toTypedValue()
37 | ];
38 | }
39 |
40 | protected function generateRandomString()
41 | {
42 | return base64_encode(bin2hex(random_bytes(round(lcg_value() * 20 + 20))));
43 | }
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/slo-workload/src/Defaults.php:
--------------------------------------------------------------------------------
1 | logger;
20 | }
21 |
22 | public function setLogger($logger){
23 | $this->logger = $logger;
24 | }
25 |
26 | /**
27 | * @return float
28 | */
29 | public function getRefreshTokenRatio(): float
30 | {
31 | return $this->refreshTokenRatio;
32 | }
33 |
34 | /**
35 | * @param float $refreshTokenRatio
36 | */
37 | public function setRefreshTokenRatio($refreshTokenRatio): void
38 | {
39 | if($refreshTokenRatio<=0||$refreshTokenRatio>=1){
40 | throw new \Exception("Refresh token ratio. Expected number between 0 and 1.");
41 | }
42 | $this->refreshTokenRatio = $refreshTokenRatio;
43 | }
44 |
45 | /**
46 | * @param string $expiresAt
47 | * @return int
48 | */
49 | protected function convertExpiresAt($expiresAt)
50 | {
51 | if (is_int($expiresAt)) {
52 | return $expiresAt;
53 | }
54 |
55 | $time = time() + 60 * 60 * Iam::DEFAULT_TOKEN_EXPIRES_AT;
56 | if (preg_match('/^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2})(?:\.\d+)?(.*)$/', $expiresAt, $matches)) {
57 | $time = new DateTime($matches[1] . $matches[2]);
58 | $time = (int)$time->format('U');
59 | }
60 | return $time;
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/src/Auth/EnvironCredentials.php:
--------------------------------------------------------------------------------
1 | auth = new JwtWithJsonAuthentication($jsonfile);
20 | } elseif (getenv("YDB_ANONYMOUS_CREDENTIALS") == 1){
21 | $this->auth = new AnonymousAuthentication();
22 | } elseif (getenv("YDB_METADATA_CREDENTIALS") == 1){
23 | $this->auth = new MetadataAuthentication();
24 | } elseif ($token = getenv("YDB_ACCESS_TOKEN_CREDENTIALS")){
25 | $this->auth = new AccessTokenAuthentication($token);
26 | } else {
27 | $this->auth = new MetadataAuthentication();
28 | }
29 | }
30 |
31 | public function getTokenInfo(): TokenInfo
32 | {
33 | return $this->auth->getTokenInfo();
34 | }
35 |
36 | public function getName(): string
37 | {
38 | return $this->auth->getName();
39 | }
40 |
41 | public function logger()
42 | {
43 | return $this->auth->logger();
44 | }
45 |
46 | public function setLogger($logger)
47 | {
48 | $this->auth->setLogger($logger);
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/src/Auth/Implement/AccessTokenAuthentication.php:
--------------------------------------------------------------------------------
1 | access_token = $access_token;
17 | }
18 |
19 | public function getTokenInfo(): TokenInfo
20 | {
21 | return new TokenInfo($this->access_token, time()+24*60*60, $this->refreshTokenRatio);
22 | }
23 |
24 | public function getName(): string
25 | {
26 | return 'Access token';
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/Auth/Implement/AnonymousAuthentication.php:
--------------------------------------------------------------------------------
1 | refreshTokenRatio);
17 | }
18 |
19 | public function getName(): string
20 | {
21 | return 'Anonymous';
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/Auth/Implement/JwtWithJsonAuthentication.php:
--------------------------------------------------------------------------------
1 | id)
18 | && isset($service->private_key)
19 | && isset($service->service_account_id)) {
20 | $this->key_id = $service->id;
21 | $this->private_key = $service->private_key;
22 | $this->service_account_id = $service->service_account_id;
23 | } else {
24 | throw new Exception('Service file [' . $serviceFile . '] is broken.');
25 | }
26 | } else {
27 | throw new Exception('Service file [' . $serviceFile . '] is missing.');
28 | }
29 | }
30 |
31 | public function getTokenInfo(): TokenInfo
32 | {
33 | $jwt_token = $this->getJwtToken();
34 | $request_data = [
35 | 'jwt' => $jwt_token,
36 | ];
37 | $token = $this->requestToken($request_data);
38 | return new TokenInfo($token->iamToken, $this->convertExpiresAt($token->expiresAt), $this->refreshTokenRatio);
39 | }
40 |
41 | public function getName(): string
42 | {
43 | return "SA JSON key";
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/src/Auth/Implement/JwtWithPrivateKeyAuthentication.php:
--------------------------------------------------------------------------------
1 | key_id = $key_id;
16 | $this->private_key = file_get_contents($privateKeyFile);
17 | $this->service_account_id = $service_account_id;
18 | }
19 | else
20 | {
21 | throw new Exception('Private key [' . $privateKeyFile . '] is missing.');
22 | }
23 | }
24 |
25 | public function getTokenInfo(): TokenInfo
26 | {
27 | $jwt_token = $this->getJwtToken();
28 | $request_data = [
29 | 'jwt' => $jwt_token,
30 | ];
31 | $token = $this->requestToken($request_data);
32 | return new TokenInfo($token->iamToken, $this->convertExpiresAt($token->expiresAt), $this->refreshTokenRatio);
33 | }
34 |
35 | public function getName(): string
36 | {
37 | return "Private key";
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/Auth/Implement/OAuthTokenAuthentication.php:
--------------------------------------------------------------------------------
1 | oauth_token = $oauth_token;
17 | }
18 |
19 | public function getTokenInfo(): TokenInfo
20 | {
21 | $request_data = [
22 | 'yandexPassportOauthToken' => $this->oauth_token,
23 | ];
24 | $token = $this->requestToken($request_data);
25 | return new TokenInfo($token->iamToken, $this->convertExpiresAt($token->expiresAt), $this->refreshTokenRatio);
26 | }
27 |
28 | public function getName(): string
29 | {
30 | return 'OAuth token';
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/Auth/Implement/StaticAuthentication.php:
--------------------------------------------------------------------------------
1 | user = $user;
24 | $this->password = $password;
25 | }
26 |
27 | public function getTokenInfo(): TokenInfo
28 | {
29 | $this->token = $this->ydb->auth()->getToken($this->user, $this->password);
30 | $jwtData = Jwt::decodeHeaderAndPayload($this->token);
31 | $expiresIn = $this->convertExpiresAt($jwtData['payload']['exp']);
32 | $ratio = $this->getRefreshTokenRatio();
33 |
34 | return new TokenInfo($this->token, $expiresIn, $ratio);
35 | }
36 |
37 | public function getName(): string
38 | {
39 | return "Static";
40 | }
41 |
42 | public function setYdbConnectionConfig(array $config)
43 | {
44 | unset($config['credentials']);
45 | $config['credentials'] = new AnonymousAuthentication();
46 | $this->ydb = new Ydb($config, $this->logger);
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/src/Auth/JwtAuth.php:
--------------------------------------------------------------------------------
1 | private_key, $this->key_id))
24 | ->issuedBy($this->service_account_id)
25 | ->issuedAt($now)
26 | ->expiresAt($now->modify('+1 hour'))
27 | ->permittedFor(Iam::IAM_TOKEN_API_URL)
28 | ->getToken();
29 | return $token;
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/src/Auth/ReadTokenFromFile.php:
--------------------------------------------------------------------------------
1 | fileName = $fileName;
21 | $this->readInterval = $readInterval;
22 | }
23 |
24 | public function getTokenInfo(): TokenInfo
25 | {
26 | $token = file_get_contents($this->fileName);
27 | if($token===false){
28 | throw new \Exception("Error reading the file '$this->fileName'");
29 | }
30 | $token = trim($token);
31 | return new TokenInfo($token, $this->readInterval, 1);
32 | }
33 |
34 | public function getName(): string
35 | {
36 | return "from file";
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/Auth/TokenInfo.php:
--------------------------------------------------------------------------------
1 | token = $token;
21 | $this->expiresAt = $expiresAt;
22 | $this->refreshAt = time() + round($refreshRatio*($this->expiresAt-time()),0);
23 | }
24 |
25 | /**
26 | * @return int
27 | */
28 | public function getExpiresAt(): int
29 | {
30 | return $this->expiresAt;
31 | }
32 |
33 | /**
34 | * @return string
35 | */
36 | public function getToken(): string
37 | {
38 | return $this->token;
39 | }
40 |
41 | public function getRefreshAt(): int
42 | {
43 | return $this->refreshAt;
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/src/Auth/UseConfigInterface.php:
--------------------------------------------------------------------------------
1 | ydb = $ydb;
30 | $this->logger = $logger;
31 | $this->client = new ServiceClient($ydb->endpoint(), $ydb->grpcOpts());
32 | $this->credentials = $ydb->iam();
33 | $this->meta = [
34 | 'x-ydb-database' => [$ydb->database()],
35 | 'x-ydb-sdk-build-info' => ['ydb-php-sdk/' . Ydb::VERSION],
36 | ];;
37 | }
38 |
39 | public function getToken(string $user, string $password){
40 | $data = [];
41 | $data["user"] = $user;
42 | $data["password"] = $password;
43 | $data["skip_get_token"] = true;
44 | return $this->doRequest('Auth', 'Login', $data)->getToken();
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/src/Contracts/IamTokenContract.php:
--------------------------------------------------------------------------------
1 | 'STATS_COLLECTION_UNSPECIFIED',
21 | self::STATS_COLLECTION_NONE => 'STATS_COLLECTION_NONE',
22 | self::STATS_COLLECTION_BASIC => 'STATS_COLLECTION_BASIC',
23 | self::STATS_COLLECTION_FULL => 'STATS_COLLECTION_FULL',
24 | self::STATS_COLLECTION_PROFILE => 'STATS_COLLECTION_PROFILE',
25 | ];
26 |
27 | public static function name($value)
28 | {
29 | if (!isset(self::$valueToName[$value])) {
30 | throw new UnexpectedValueException(sprintf(
31 | 'Enum %s has no name defined for value %s', __CLASS__, $value));
32 | }
33 | return self::$valueToName[$value];
34 | }
35 |
36 |
37 | public static function value($name)
38 | {
39 | $const = __CLASS__ . '::' . strtoupper($name);
40 | if (!defined($const)) {
41 | throw new UnexpectedValueException(sprintf(
42 | 'Enum %s has no value defined for name %s', __CLASS__, $name));
43 | }
44 | return constant($const);
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/src/Enums/ScanQueryMode.php:
--------------------------------------------------------------------------------
1 | 'MODE_UNSPECIFIED',
15 | self::MODE_EXPLAIN => 'MODE_EXPLAIN',
16 | self::MODE_EXEC => 'MODE_EXEC',
17 | ];
18 |
19 | public static function name($value)
20 | {
21 | if (!isset(self::$valueToName[$value])) {
22 | throw new UnexpectedValueException(sprintf(
23 | 'Enum %s has no name defined for value %s', __CLASS__, $value));
24 | }
25 | return self::$valueToName[$value];
26 | }
27 |
28 |
29 | public static function value($name)
30 | {
31 | $const = __CLASS__ . '::' . strtoupper($name);
32 | if (!defined($const)) {
33 | throw new UnexpectedValueException(sprintf(
34 | 'Enum %s has no value defined for name %s', __CLASS__, $name));
35 | }
36 | return constant($const);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/Exception.php:
--------------------------------------------------------------------------------
1 | issue = $issue;
17 | }
18 |
19 | /**
20 | * @return string
21 | */
22 | public function toString()
23 | {
24 | $msg = trim($this->issue->getMessage());
25 | if (count($this->issue->getIssues()))
26 | {
27 | $msg .= ':';
28 | }
29 |
30 | $msgs = [$msg];
31 | $issues = static::getSubIssues($this->issue);
32 | if ($issues)
33 | {
34 | array_push($msgs, ...$issues);
35 | }
36 |
37 | return implode("\n", $msgs);
38 | }
39 |
40 | /**
41 | * @param \Ydb\Issue\IssueMessage $issue
42 | * @param int $level
43 | * @return array
44 | */
45 | protected static function getSubIssues(IssueMessage $issue, $level = 0)
46 | {
47 | $msgs = [];
48 | foreach ($issue->getIssues() as $sub_issue)
49 | {
50 | $msg = str_repeat(' ', $level) . '- ' . trim($sub_issue->getMessage());
51 | $msgs[] = $msg;
52 | $issues = static::getSubIssues($sub_issue, $level + 1);
53 | if ($issues)
54 | {
55 | array_push($msgs, ...$issues);
56 | }
57 | }
58 | return $msgs;
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/src/Logger/NullLogger.php:
--------------------------------------------------------------------------------
1 | compilationStats = $compilationStats;
15 | }
16 |
17 | /**
18 | * @return bool
19 | */
20 | public function getFromCache(): bool
21 | {
22 | return $this->compilationStats->getFromCache();
23 | }
24 |
25 | /**
26 | * @return int|string
27 | */
28 | public function getDurationUs()
29 | {
30 | return $this->compilationStats->getDurationUs();
31 | }
32 |
33 | /**
34 | * @return int|string
35 | */
36 | public function getCpuTimeUs()
37 | {
38 | return $this->compilationStats->getCpuTimeUs();
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/QueryStats/OperationStats.php:
--------------------------------------------------------------------------------
1 | operationStats = $operationStats;
11 | }
12 |
13 | /**
14 | * @return int|string
15 | */
16 | public function getRows()
17 | {
18 | return $this->operationStats->getRows();
19 | }
20 |
21 | /**
22 | * @return int|string
23 | */
24 | public function getBytes()
25 | {
26 | return $this->operationStats->getBytes();
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/QueryStats/QueryPhaseStats.php:
--------------------------------------------------------------------------------
1 | phaseStats = $phaseStats;
15 | }
16 |
17 |
18 | /**
19 | * @return int|string
20 | */
21 | public function getDurationUs()
22 | {
23 | return $this->phaseStats->getDurationUs();
24 | }
25 |
26 | /**
27 | * @return TableAccessStats[]
28 | */
29 | public function getTableAccess()
30 | {
31 | $result = iterator_to_array($this->phaseStats->getTableAccess());
32 | foreach ($result as $key=>$item) {
33 | $result[$key] = new TableAccessStats($item);
34 | }
35 | return $result;
36 | }
37 |
38 | /**
39 | * @return int|string
40 | */
41 | public function getCpuTimeUs()
42 | {
43 | return $this->phaseStats->getCpuTimeUs();
44 | }
45 |
46 | /**
47 | * @return int|string
48 | */
49 | public function getAffectedShards()
50 | {
51 | return $this->phaseStats->getAffectedShards();
52 | }
53 |
54 | /**
55 | * @return bool
56 | */
57 | public function getLiteralPhase()
58 | {
59 | return $this->phaseStats->getLiteralPhase();
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/src/QueryStats/QueryStats.php:
--------------------------------------------------------------------------------
1 | queryStats = $queryStats;
12 | }
13 |
14 | /**
15 | * @return QueryPhaseStats[]
16 | */
17 | public function getQueryPhases()
18 | {
19 | $result = iterator_to_array($this->queryStats->getQueryPhases()->getIterator());
20 | foreach ($result as $key=>$item) {
21 | $result[$key] = new QueryPhaseStats($item);
22 | }
23 | return $result;
24 | }
25 |
26 | /**
27 | * @return CompilationStats|null
28 | */
29 | public function getCompilation(): ?CompilationStats
30 | {
31 | if($this->queryStats->getQueryPhases()){
32 | return new CompilationStats($this->queryStats->getCompilation());
33 | } else {
34 | return null;
35 | }
36 | }
37 |
38 | /**
39 | * @return int|string
40 | */
41 | public function getProcessCpuTimeUs()
42 | {
43 | return $this->queryStats->getProcessCpuTimeUs();
44 | }
45 |
46 | /**
47 | * @return string
48 | */
49 | public function getQueryPlan(): string
50 | {
51 | return $this->queryStats->getQueryPlan();
52 | }
53 |
54 | /**
55 | * @return string
56 | */
57 | public function getQueryAst(): string
58 | {
59 | return $this->queryStats->getQueryAst();
60 | }
61 |
62 | /**
63 | * @return int|string
64 | */
65 | public function getTotalDurationUs()
66 | {
67 | return $this->queryStats->getTotalDurationUs();
68 | }
69 |
70 | /**
71 | * @return int|string
72 | */
73 | public function getTotalCpuTimeUs()
74 | {
75 | return $this->queryStats->getTotalCpuTimeUs();
76 | }
77 |
78 | }
79 |
--------------------------------------------------------------------------------
/src/Retry/Backoff.php:
--------------------------------------------------------------------------------
1 | backoffCeiling = $backoffCeiling;
17 | $this->backoffSlotMillis = $backoffSlotMillis;
18 | }
19 |
20 | /**
21 | * @return mixed
22 | */
23 | public function getBackoffCeiling()
24 | {
25 | return $this->backoffCeiling;
26 | }
27 |
28 | /**
29 | * @return mixed
30 | */
31 | public function getBackoffSlotMillis()
32 | {
33 | return $this->backoffSlotMillis;
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/src/Retry/RetryParams.php:
--------------------------------------------------------------------------------
1 | timeoutMs = $timeoutMs;
17 | $this->fastBackOff = $fastBackOff;
18 | $this->slowBackOff = $slowBackOff;
19 | }
20 |
21 | /**
22 | * @return int|null
23 | */
24 | public function getTimeoutMs()
25 | {
26 | return $this->timeoutMs;
27 | }
28 |
29 | /**
30 | * @return Backoff|null
31 | */
32 | public function getSlowBackOff(): ?Backoff
33 | {
34 | return $this->slowBackOff;
35 | }
36 |
37 | /**
38 | * @return Backoff|null
39 | */
40 | public function getFastBackOff(): ?Backoff
41 | {
42 | return $this->fastBackOff;
43 | }
44 |
45 | /**
46 | * @param int|mixed $timeoutMs
47 | */
48 | public function setTimeoutMs($timeoutMs): void
49 | {
50 | $this->timeoutMs = $timeoutMs;
51 | }
52 |
53 | /**
54 | * @param Backoff $slowBackOff
55 | */
56 | public function setSlowBackOff(Backoff $slowBackOff): void
57 | {
58 | $this->slowBackOff = $slowBackOff;
59 | }
60 |
61 | /**
62 | * @param Backoff $fastBackOff
63 | */
64 | public function setFastBackOff(Backoff $fastBackOff): void
65 | {
66 | $this->fastBackOff = $fastBackOff;
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/src/Traits/LoggerTrait.php:
--------------------------------------------------------------------------------
1 | logger)
15 | {
16 | return $this->logger;
17 | }
18 | else
19 | {
20 | return new NullLogger;
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/src/Traits/ParseResultTrait.php:
--------------------------------------------------------------------------------
1 | serializeToJsonString(), true);
16 |
17 | $parsedResult = [];
18 |
19 | if (is_array($properties))
20 | {
21 | foreach ($properties as $property)
22 | {
23 | $parsedResult[$property] = $result[$property] ?? null;
24 | }
25 | }
26 | else if (is_string($properties))
27 | {
28 | $parsedResult = $result[$properties] ?? $default;
29 | }
30 | else
31 | {
32 | $parsedResult = $result;
33 | }
34 |
35 | return $parsedResult;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/Types/BigIntType.php:
--------------------------------------------------------------------------------
1 | value ? 'true' : 'false';
31 | }
32 |
33 | /**
34 | * @inherit
35 | */
36 | protected function getYdbValue()
37 | {
38 | return (int)$this->value;
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Types/DateType.php:
--------------------------------------------------------------------------------
1 | format(static::$date_format);
34 | }
35 | else if (is_int($value))
36 | {
37 | $value = date(static::$date_format, $value);
38 | }
39 | else if (is_string($value))
40 | {
41 | $value = new DateTime($value);
42 | $value = $value->format(static::$date_format);
43 | }
44 | else
45 | {
46 | throw new Exception('YDB Casting failed for date value');
47 | }
48 |
49 | return $value;
50 | }
51 |
52 | /**
53 | * @inherit
54 | */
55 | protected function getYqlString()
56 | {
57 | return 'Date(' . $this->quoteString($this->value) . ')';
58 | }
59 |
60 | /**
61 | * @inherit
62 | */
63 | protected function getYdbValue()
64 | {
65 | $value = new DateTime($this->value);
66 | return $value->getTimestamp() / 86400;
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/src/Types/DecimalType.php:
--------------------------------------------------------------------------------
1 | digits = $digits;
24 | return $this;
25 | }
26 |
27 | /**
28 | * @param int $scale
29 | * @return $this
30 | */
31 | public function scale($scale)
32 | {
33 | $this->scale = $scale;
34 | return $this;
35 | }
36 |
37 | /**
38 | * @inherit
39 | */
40 | protected function normalizeValue($value)
41 | {
42 | return (float)$value;
43 | }
44 |
45 | /**
46 | * @inherit
47 | */
48 | protected function getYqlString()
49 | {
50 | return 'Decimal(' . $this->quoteString($this->value) . ', ' . $this->digits . ', ' . $this->scale . ')';
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/src/Types/DoubleType.php:
--------------------------------------------------------------------------------
1 | quoteString($this->value) . ')';
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/Types/FloatType.php:
--------------------------------------------------------------------------------
1 | quoteString($this->value) . ')';
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/Types/Int16Type.php:
--------------------------------------------------------------------------------
1 | value . '@@)';
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/src/Types/SmallIntType.php:
--------------------------------------------------------------------------------
1 | quoteString($this->value) . ')';
24 | }
25 |
26 | /**
27 | * @inherit
28 | */
29 | protected function getYdbValue()
30 | {
31 | $value = new DateTime($this->value);
32 | return $value->format("U.u") * 1000000;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/Types/TinyIntType.php:
--------------------------------------------------------------------------------
1 | value . '@@)';
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/Version.php:
--------------------------------------------------------------------------------
1 |