From 9f0a0b109eeb1ce5263fd2ab8b36c01617bc9e71 Mon Sep 17 00:00:00 2001 From: rishtigupta <127137312+rishtigupta@users.noreply.github.com> Date: Fri, 16 Feb 2024 11:09:28 -0700 Subject: [PATCH 1/2] feat: add getBatch and setBatch (#177) --- composer.json | 3 + composer.lock | 532 +++++++++---- src/Cache/CacheClient.php | 104 +++ .../CacheOperationTypes.php | 109 ++- .../Interceptors/AuthorizationInterceptor.php | 5 + src/Cache/Internal/ScsDataClient.php | 115 +++ src/Cache/Psr16CacheClient.php | 733 ++++++++++++------ tests/Cache/CacheClientTest.php | 159 ++++ types/Auth/_GenerateApiTokenRequest.php | 68 +- .../ExplicitPermissions.php | 61 -- .../PermissionsType.php | 99 --- .../PermissionsType/CachePermissions.php | 61 -- .../PermissionsType/TopicPermissions.php | 61 -- .../_GenerateApiTokenRequest_CacheRole.php | 16 - ...ateApiTokenRequest_ExplicitPermissions.php | 16 - .../_GenerateApiTokenRequest_Permissions.php | 16 - ...enerateApiTokenRequest_PermissionsType.php | 16 - ...quest_PermissionsType_CachePermissions.php | 16 - ...quest_PermissionsType_TopicPermissions.php | 16 - ...teApiTokenRequest_SuperUserPermissions.php | 16 - .../_GenerateApiTokenRequest_TopicRole.php | 16 - types/Cache_client/PingClient.php | 33 + types/Cache_client/Pubsub/PubsubClient.php | 77 ++ types/Cache_client/Pubsub/_Discontinuity.php | 103 +++ types/Cache_client/Pubsub/_Empty.php | 31 + types/Cache_client/Pubsub/_Heartbeat.php | 39 + types/Cache_client/Pubsub/_PublishRequest.php | 149 ++++ .../Cache_client/Pubsub/_SubscriptionItem.php | 152 ++++ .../Pubsub/_SubscriptionRequest.php | 151 ++++ types/Cache_client/Pubsub/_TopicItem.php | 173 +++++ types/Cache_client/Pubsub/_TopicValue.php | 98 +++ types/Cache_client/ScsClient.php | 86 ++ types/Cache_client/_GetBatchRequest.php | 58 ++ types/Cache_client/_PingRequest.php | 31 + types/Cache_client/_PingResponse.php | 31 + types/Cache_client/_SetBatchRequest.php | 58 ++ types/Cache_client/_SetPopRequest.php | 85 ++ types/Cache_client/_SetPopResponse.php | 96 +++ types/Cache_client/_SetPopResponse/_Found.php | 61 ++ .../Cache_client/_SetPopResponse/_Missing.php | 34 + types/Cache_client/_SetPopResponse__Found.php | 16 + .../Cache_client/_SetPopResponse__Missing.php | 16 + types/Cache_client/_SetSampleRequest.php | 85 ++ types/Cache_client/_SetSampleResponse.php | 96 +++ .../_SetSampleResponse/_Found.php | 61 ++ .../_SetSampleResponse/_Missing.php | 34 + .../_SetSampleResponse__Found.php | 16 + .../_SetSampleResponse__Missing.php | 16 + .../_SortedSetLengthByScoreRequest.php | 244 ++++++ .../_SortedSetLengthByScoreResponse.php | 96 +++ .../_Found.php | 61 ++ .../_Missing.php | 34 + ..._SortedSetLengthByScoreResponse__Found.php | 16 + ...ortedSetLengthByScoreResponse__Missing.php | 16 + .../Cache_client/_SortedSetLengthRequest.php | 58 ++ .../Cache_client/_SortedSetLengthResponse.php | 96 +++ .../_SortedSetLengthResponse/_Found.php | 61 ++ .../_SortedSetLengthResponse/_Missing.php | 34 + .../_SortedSetLengthResponse__Found.php | 16 + .../_SortedSetLengthResponse__Missing.php | 16 + types/Control_client/ScsControlClient.php | 42 + types/Control_client/_Cache.php | 74 ++ types/Control_client/_CacheLimits.php | 167 ++++ types/Control_client/_CreateIndexRequest.php | 122 +++ types/Control_client/_CreateIndexResponse.php | 31 + types/Control_client/_DeleteIndexRequest.php | 58 ++ types/Control_client/_DeleteIndexResponse.php | 31 + types/Control_client/_ListIndexesRequest.php | 31 + types/Control_client/_ListIndexesResponse.php | 58 ++ .../_ListIndexesResponse/_Index.php | 125 +++ .../_ListIndexesResponse__Index.php | 16 + types/Control_client/_SimilarityMetric.php | 124 +++ .../_SimilarityMetric/_CosineSimilarity.php | 34 + .../_EuclideanSimilarity.php | 34 + .../_SimilarityMetric/_InnerProduct.php | 34 + .../_SimilarityMetric__CosineSimilarity.php | 16 + ..._SimilarityMetric__EuclideanSimilarity.php | 16 + .../_SimilarityMetric__InnerProduct.php | 16 + types/Control_client/_TopicLimits.php | 133 ++++ types/GPBMetadata/Auth.php | Bin 2565 -> 1867 bytes types/GPBMetadata/Cacheclient.php | Bin 15159 -> 17050 bytes types/GPBMetadata/Cacheping.php | Bin 0 -> 745 bytes types/GPBMetadata/Cachepubsub.php | Bin 0 -> 1581 bytes types/GPBMetadata/Controlclient.php | Bin 2086 -> 3495 bytes types/GPBMetadata/Extensions.php | Bin 0 -> 707 bytes types/GPBMetadata/Leaderboard.php | Bin 0 -> 2691 bytes types/GPBMetadata/Permissionmessages.php | Bin 0 -> 2282 bytes types/GPBMetadata/Token.php | Bin 0 -> 1113 bytes types/GPBMetadata/Vectorindex.php | Bin 0 -> 6021 bytes types/GPBMetadata/Webhook.php | Bin 0 -> 1798 bytes types/Leaderboard/LeaderboardClient.php | 145 ++++ .../Leaderboard/_DeleteLeaderboardRequest.php | 85 ++ types/Leaderboard/_Element.php | 117 +++ types/Leaderboard/_Empty.php | 31 + types/Leaderboard/_GetByRankRequest.php | 149 ++++ types/Leaderboard/_GetByRankResponse.php | 58 ++ types/Leaderboard/_GetByScoreRequest.php | 217 ++++++ types/Leaderboard/_GetByScoreResponse.php | 58 ++ .../_GetLeaderboardLengthRequest.php | 85 ++ .../_GetLeaderboardLengthResponse.php | 58 ++ types/Leaderboard/_GetRankRequest.php | 139 ++++ types/Leaderboard/_GetRankResponse.php | 58 ++ types/Leaderboard/_Order.php | 52 ++ types/Leaderboard/_RankRange.php | 100 +++ types/Leaderboard/_RankedElement.php | 115 +++ types/Leaderboard/_RemoveElementsRequest.php | 119 +++ types/Leaderboard/_ScoreRange.php | 182 +++++ types/Leaderboard/_Unbounded.php | 31 + types/Leaderboard/_UpsertElementsRequest.php | 119 +++ .../CacheRole.php | 24 +- .../ExplicitPermissions.php | 58 ++ .../Permissions.php | 29 +- types/Permission_messages/PermissionsType.php | 96 +++ .../PermissionsType/All.php | 34 + .../PermissionsType/CacheItemSelector.php | 99 +++ .../PermissionsType/CachePermissions.php | 191 +++++ .../PermissionsType/CacheSelector.php | 71 ++ .../PermissionsType/TopicPermissions.php | 191 +++++ .../PermissionsType/TopicSelector.php | 99 +++ .../PermissionsType_All.php | 16 + .../PermissionsType_CacheItemSelector.php | 16 + .../PermissionsType_CachePermissions.php | 16 + .../PermissionsType_CacheSelector.php | 16 + .../PermissionsType_TopicPermissions.php | 16 + .../PermissionsType_TopicSelector.php | 16 + .../SuperUserPermissions.php | 9 +- .../TopicRole.php | 23 +- types/RetrySemantic.php | 50 ++ types/Token/TokenClient.php | 33 + .../Token/_GenerateDisposableTokenRequest.php | 159 ++++ .../Expires.php | 70 ++ ...GenerateDisposableTokenRequest_Expires.php | 16 + .../_GenerateDisposableTokenResponse.php | 133 ++++ types/Vectorindex/VectorIndexClient.php | 117 +++ types/Vectorindex/_AndExpression.php | 105 +++ types/Vectorindex/_CountItemsRequest.php | 95 +++ types/Vectorindex/_CountItemsRequest/All.php | 34 + types/Vectorindex/_CountItemsRequest_All.php | 16 + types/Vectorindex/_CountItemsResponse.php | 58 ++ types/Vectorindex/_DeleteItemBatchRequest.php | 129 +++ .../Vectorindex/_DeleteItemBatchResponse.php | 31 + types/Vectorindex/_EqualsExpression.php | 179 +++++ types/Vectorindex/_FilterExpression.php | 320 ++++++++ types/Vectorindex/_GetItemBatchRequest.php | 159 ++++ types/Vectorindex/_GetItemBatchResponse.php | 58 ++ .../_GetItemMetadataBatchRequest.php | 166 ++++ .../_GetItemMetadataBatchResponse.php | 58 ++ types/Vectorindex/_GreaterThanExpression.php | 123 +++ .../_GreaterThanOrEqualExpression.php | 123 +++ types/Vectorindex/_IdInSetExpression.php | 58 ++ types/Vectorindex/_Item.php | 122 +++ types/Vectorindex/_ItemMetadataResponse.php | 160 ++++ .../_ItemMetadataResponse/_Hit.php | 88 +++ .../_ItemMetadataResponse/_Miss.php | 34 + .../_ItemMetadataResponse__Hit.php | 16 + .../_ItemMetadataResponse__Miss.php | 16 + types/Vectorindex/_ItemResponse.php | 197 +++++ types/Vectorindex/_ItemResponse/_Hit.php | 125 +++ types/Vectorindex/_ItemResponse/_Miss.php | 34 + types/Vectorindex/_ItemResponse__Hit.php | 16 + types/Vectorindex/_ItemResponse__Miss.php | 16 + types/Vectorindex/_LessThanExpression.php | 123 +++ .../_LessThanOrEqualExpression.php | 123 +++ types/Vectorindex/_ListContainsExpression.php | 95 +++ types/Vectorindex/_Metadata.php | 207 +++++ .../Vectorindex/_Metadata/_ListOfStrings.php | 61 ++ types/Vectorindex/_MetadataRequest.php | 96 +++ types/Vectorindex/_MetadataRequest/All.php | 34 + types/Vectorindex/_MetadataRequest/Some.php | 61 ++ types/Vectorindex/_MetadataRequest_All.php | 16 + types/Vectorindex/_MetadataRequest_Some.php | 16 + .../Vectorindex/_Metadata__ListOfStrings.php | 16 + types/Vectorindex/_NoScoreThreshold.php | 31 + types/Vectorindex/_NotExpression.php | 68 ++ types/Vectorindex/_OrExpression.php | 105 +++ .../Vectorindex/_SearchAndFetchVectorsHit.php | 149 ++++ .../_SearchAndFetchVectorsRequest.php | 261 +++++++ .../_SearchAndFetchVectorsResponse.php | 58 ++ types/Vectorindex/_SearchHit.php | 112 +++ types/Vectorindex/_SearchRequest.php | 261 +++++++ types/Vectorindex/_SearchResponse.php | 58 ++ types/Vectorindex/_UpsertItemBatchRequest.php | 85 ++ .../Vectorindex/_UpsertItemBatchResponse.php | 58 ++ types/Vectorindex/_Vector.php | 58 ++ types/Webhook/WebhookClient.php | 94 +++ types/Webhook/_DeleteWebhookRequest.php | 68 ++ types/Webhook/_DeleteWebhookResponse.php | 31 + types/Webhook/_GetWebhookSecretRequest.php | 85 ++ types/Webhook/_GetWebhookSecretResponse.php | 112 +++ types/Webhook/_ListWebhookRequest.php | 58 ++ types/Webhook/_ListWebhooksResponse.php | 58 ++ types/Webhook/_PutWebhookRequest.php | 68 ++ types/Webhook/_PutWebhookResponse.php | 58 ++ types/Webhook/_RotateWebhookSecretRequest.php | 68 ++ .../Webhook/_RotateWebhookSecretResponse.php | 58 ++ types/Webhook/_Webhook.php | 132 ++++ types/Webhook/_WebhookDestination.php | 68 ++ types/Webhook/_WebhookId.php | 92 +++ 198 files changed, 14453 insertions(+), 835 deletions(-) delete mode 100644 types/Auth/_GenerateApiTokenRequest/ExplicitPermissions.php delete mode 100644 types/Auth/_GenerateApiTokenRequest/PermissionsType.php delete mode 100644 types/Auth/_GenerateApiTokenRequest/PermissionsType/CachePermissions.php delete mode 100644 types/Auth/_GenerateApiTokenRequest/PermissionsType/TopicPermissions.php delete mode 100644 types/Auth/_GenerateApiTokenRequest_CacheRole.php delete mode 100644 types/Auth/_GenerateApiTokenRequest_ExplicitPermissions.php delete mode 100644 types/Auth/_GenerateApiTokenRequest_Permissions.php delete mode 100644 types/Auth/_GenerateApiTokenRequest_PermissionsType.php delete mode 100644 types/Auth/_GenerateApiTokenRequest_PermissionsType_CachePermissions.php delete mode 100644 types/Auth/_GenerateApiTokenRequest_PermissionsType_TopicPermissions.php delete mode 100644 types/Auth/_GenerateApiTokenRequest_SuperUserPermissions.php delete mode 100644 types/Auth/_GenerateApiTokenRequest_TopicRole.php create mode 100644 types/Cache_client/PingClient.php create mode 100644 types/Cache_client/Pubsub/PubsubClient.php create mode 100644 types/Cache_client/Pubsub/_Discontinuity.php create mode 100644 types/Cache_client/Pubsub/_Empty.php create mode 100644 types/Cache_client/Pubsub/_Heartbeat.php create mode 100644 types/Cache_client/Pubsub/_PublishRequest.php create mode 100644 types/Cache_client/Pubsub/_SubscriptionItem.php create mode 100644 types/Cache_client/Pubsub/_SubscriptionRequest.php create mode 100644 types/Cache_client/Pubsub/_TopicItem.php create mode 100644 types/Cache_client/Pubsub/_TopicValue.php create mode 100644 types/Cache_client/_GetBatchRequest.php create mode 100644 types/Cache_client/_PingRequest.php create mode 100644 types/Cache_client/_PingResponse.php create mode 100644 types/Cache_client/_SetBatchRequest.php create mode 100644 types/Cache_client/_SetPopRequest.php create mode 100644 types/Cache_client/_SetPopResponse.php create mode 100644 types/Cache_client/_SetPopResponse/_Found.php create mode 100644 types/Cache_client/_SetPopResponse/_Missing.php create mode 100644 types/Cache_client/_SetPopResponse__Found.php create mode 100644 types/Cache_client/_SetPopResponse__Missing.php create mode 100644 types/Cache_client/_SetSampleRequest.php create mode 100644 types/Cache_client/_SetSampleResponse.php create mode 100644 types/Cache_client/_SetSampleResponse/_Found.php create mode 100644 types/Cache_client/_SetSampleResponse/_Missing.php create mode 100644 types/Cache_client/_SetSampleResponse__Found.php create mode 100644 types/Cache_client/_SetSampleResponse__Missing.php create mode 100644 types/Cache_client/_SortedSetLengthByScoreRequest.php create mode 100644 types/Cache_client/_SortedSetLengthByScoreResponse.php create mode 100644 types/Cache_client/_SortedSetLengthByScoreResponse/_Found.php create mode 100644 types/Cache_client/_SortedSetLengthByScoreResponse/_Missing.php create mode 100644 types/Cache_client/_SortedSetLengthByScoreResponse__Found.php create mode 100644 types/Cache_client/_SortedSetLengthByScoreResponse__Missing.php create mode 100644 types/Cache_client/_SortedSetLengthRequest.php create mode 100644 types/Cache_client/_SortedSetLengthResponse.php create mode 100644 types/Cache_client/_SortedSetLengthResponse/_Found.php create mode 100644 types/Cache_client/_SortedSetLengthResponse/_Missing.php create mode 100644 types/Cache_client/_SortedSetLengthResponse__Found.php create mode 100644 types/Cache_client/_SortedSetLengthResponse__Missing.php create mode 100644 types/Control_client/_CacheLimits.php create mode 100644 types/Control_client/_CreateIndexRequest.php create mode 100644 types/Control_client/_CreateIndexResponse.php create mode 100644 types/Control_client/_DeleteIndexRequest.php create mode 100644 types/Control_client/_DeleteIndexResponse.php create mode 100644 types/Control_client/_ListIndexesRequest.php create mode 100644 types/Control_client/_ListIndexesResponse.php create mode 100644 types/Control_client/_ListIndexesResponse/_Index.php create mode 100644 types/Control_client/_ListIndexesResponse__Index.php create mode 100644 types/Control_client/_SimilarityMetric.php create mode 100644 types/Control_client/_SimilarityMetric/_CosineSimilarity.php create mode 100644 types/Control_client/_SimilarityMetric/_EuclideanSimilarity.php create mode 100644 types/Control_client/_SimilarityMetric/_InnerProduct.php create mode 100644 types/Control_client/_SimilarityMetric__CosineSimilarity.php create mode 100644 types/Control_client/_SimilarityMetric__EuclideanSimilarity.php create mode 100644 types/Control_client/_SimilarityMetric__InnerProduct.php create mode 100644 types/Control_client/_TopicLimits.php create mode 100644 types/GPBMetadata/Cacheping.php create mode 100644 types/GPBMetadata/Cachepubsub.php create mode 100644 types/GPBMetadata/Extensions.php create mode 100644 types/GPBMetadata/Leaderboard.php create mode 100644 types/GPBMetadata/Permissionmessages.php create mode 100644 types/GPBMetadata/Token.php create mode 100644 types/GPBMetadata/Vectorindex.php create mode 100644 types/GPBMetadata/Webhook.php create mode 100644 types/Leaderboard/LeaderboardClient.php create mode 100644 types/Leaderboard/_DeleteLeaderboardRequest.php create mode 100644 types/Leaderboard/_Element.php create mode 100644 types/Leaderboard/_Empty.php create mode 100644 types/Leaderboard/_GetByRankRequest.php create mode 100644 types/Leaderboard/_GetByRankResponse.php create mode 100644 types/Leaderboard/_GetByScoreRequest.php create mode 100644 types/Leaderboard/_GetByScoreResponse.php create mode 100644 types/Leaderboard/_GetLeaderboardLengthRequest.php create mode 100644 types/Leaderboard/_GetLeaderboardLengthResponse.php create mode 100644 types/Leaderboard/_GetRankRequest.php create mode 100644 types/Leaderboard/_GetRankResponse.php create mode 100644 types/Leaderboard/_Order.php create mode 100644 types/Leaderboard/_RankRange.php create mode 100644 types/Leaderboard/_RankedElement.php create mode 100644 types/Leaderboard/_RemoveElementsRequest.php create mode 100644 types/Leaderboard/_ScoreRange.php create mode 100644 types/Leaderboard/_Unbounded.php create mode 100644 types/Leaderboard/_UpsertElementsRequest.php rename types/{Auth/_GenerateApiTokenRequest => Permission_messages}/CacheRole.php (63%) create mode 100644 types/Permission_messages/ExplicitPermissions.php rename types/{Auth/_GenerateApiTokenRequest => Permission_messages}/Permissions.php (53%) create mode 100644 types/Permission_messages/PermissionsType.php create mode 100644 types/Permission_messages/PermissionsType/All.php create mode 100644 types/Permission_messages/PermissionsType/CacheItemSelector.php create mode 100644 types/Permission_messages/PermissionsType/CachePermissions.php create mode 100644 types/Permission_messages/PermissionsType/CacheSelector.php create mode 100644 types/Permission_messages/PermissionsType/TopicPermissions.php create mode 100644 types/Permission_messages/PermissionsType/TopicSelector.php create mode 100644 types/Permission_messages/PermissionsType_All.php create mode 100644 types/Permission_messages/PermissionsType_CacheItemSelector.php create mode 100644 types/Permission_messages/PermissionsType_CachePermissions.php create mode 100644 types/Permission_messages/PermissionsType_CacheSelector.php create mode 100644 types/Permission_messages/PermissionsType_TopicPermissions.php create mode 100644 types/Permission_messages/PermissionsType_TopicSelector.php rename types/{Auth/_GenerateApiTokenRequest => Permission_messages}/SuperUserPermissions.php (74%) rename types/{Auth/_GenerateApiTokenRequest => Permission_messages}/TopicRole.php (65%) create mode 100644 types/RetrySemantic.php create mode 100644 types/Token/TokenClient.php create mode 100644 types/Token/_GenerateDisposableTokenRequest.php create mode 100644 types/Token/_GenerateDisposableTokenRequest/Expires.php create mode 100644 types/Token/_GenerateDisposableTokenRequest_Expires.php create mode 100644 types/Token/_GenerateDisposableTokenResponse.php create mode 100644 types/Vectorindex/VectorIndexClient.php create mode 100644 types/Vectorindex/_AndExpression.php create mode 100644 types/Vectorindex/_CountItemsRequest.php create mode 100644 types/Vectorindex/_CountItemsRequest/All.php create mode 100644 types/Vectorindex/_CountItemsRequest_All.php create mode 100644 types/Vectorindex/_CountItemsResponse.php create mode 100644 types/Vectorindex/_DeleteItemBatchRequest.php create mode 100644 types/Vectorindex/_DeleteItemBatchResponse.php create mode 100644 types/Vectorindex/_EqualsExpression.php create mode 100644 types/Vectorindex/_FilterExpression.php create mode 100644 types/Vectorindex/_GetItemBatchRequest.php create mode 100644 types/Vectorindex/_GetItemBatchResponse.php create mode 100644 types/Vectorindex/_GetItemMetadataBatchRequest.php create mode 100644 types/Vectorindex/_GetItemMetadataBatchResponse.php create mode 100644 types/Vectorindex/_GreaterThanExpression.php create mode 100644 types/Vectorindex/_GreaterThanOrEqualExpression.php create mode 100644 types/Vectorindex/_IdInSetExpression.php create mode 100644 types/Vectorindex/_Item.php create mode 100644 types/Vectorindex/_ItemMetadataResponse.php create mode 100644 types/Vectorindex/_ItemMetadataResponse/_Hit.php create mode 100644 types/Vectorindex/_ItemMetadataResponse/_Miss.php create mode 100644 types/Vectorindex/_ItemMetadataResponse__Hit.php create mode 100644 types/Vectorindex/_ItemMetadataResponse__Miss.php create mode 100644 types/Vectorindex/_ItemResponse.php create mode 100644 types/Vectorindex/_ItemResponse/_Hit.php create mode 100644 types/Vectorindex/_ItemResponse/_Miss.php create mode 100644 types/Vectorindex/_ItemResponse__Hit.php create mode 100644 types/Vectorindex/_ItemResponse__Miss.php create mode 100644 types/Vectorindex/_LessThanExpression.php create mode 100644 types/Vectorindex/_LessThanOrEqualExpression.php create mode 100644 types/Vectorindex/_ListContainsExpression.php create mode 100644 types/Vectorindex/_Metadata.php create mode 100644 types/Vectorindex/_Metadata/_ListOfStrings.php create mode 100644 types/Vectorindex/_MetadataRequest.php create mode 100644 types/Vectorindex/_MetadataRequest/All.php create mode 100644 types/Vectorindex/_MetadataRequest/Some.php create mode 100644 types/Vectorindex/_MetadataRequest_All.php create mode 100644 types/Vectorindex/_MetadataRequest_Some.php create mode 100644 types/Vectorindex/_Metadata__ListOfStrings.php create mode 100644 types/Vectorindex/_NoScoreThreshold.php create mode 100644 types/Vectorindex/_NotExpression.php create mode 100644 types/Vectorindex/_OrExpression.php create mode 100644 types/Vectorindex/_SearchAndFetchVectorsHit.php create mode 100644 types/Vectorindex/_SearchAndFetchVectorsRequest.php create mode 100644 types/Vectorindex/_SearchAndFetchVectorsResponse.php create mode 100644 types/Vectorindex/_SearchHit.php create mode 100644 types/Vectorindex/_SearchRequest.php create mode 100644 types/Vectorindex/_SearchResponse.php create mode 100644 types/Vectorindex/_UpsertItemBatchRequest.php create mode 100644 types/Vectorindex/_UpsertItemBatchResponse.php create mode 100644 types/Vectorindex/_Vector.php create mode 100644 types/Webhook/WebhookClient.php create mode 100644 types/Webhook/_DeleteWebhookRequest.php create mode 100644 types/Webhook/_DeleteWebhookResponse.php create mode 100644 types/Webhook/_GetWebhookSecretRequest.php create mode 100644 types/Webhook/_GetWebhookSecretResponse.php create mode 100644 types/Webhook/_ListWebhookRequest.php create mode 100644 types/Webhook/_ListWebhooksResponse.php create mode 100644 types/Webhook/_PutWebhookRequest.php create mode 100644 types/Webhook/_PutWebhookResponse.php create mode 100644 types/Webhook/_RotateWebhookSecretRequest.php create mode 100644 types/Webhook/_RotateWebhookSecretResponse.php create mode 100644 types/Webhook/_Webhook.php create mode 100644 types/Webhook/_WebhookDestination.php create mode 100644 types/Webhook/_WebhookId.php diff --git a/composer.json b/composer.json index 8e0c2c77..e4b0bd2e 100644 --- a/composer.json +++ b/composer.json @@ -52,6 +52,9 @@ "phpunit/phpunit": "^9.5.23" }, "config": { + "platform": { + "php": "7.4.15" + }, "optimize-autoloader": true, "preferred-install": "dist", "sort-packages": true diff --git a/composer.lock b/composer.lock index ef778f03..c95fef18 100644 --- a/composer.lock +++ b/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "315b173030672bf79996957c7ca1f4a4", + "content-hash": "4dc2ab4ce889e1bf564a4c585f197250", "packages": [ { "name": "firebase/php-jwt", - "version": "v6.8.1", + "version": "v6.10.0", "source": { "type": "git", "url": "https://github.com/firebase/php-jwt.git", - "reference": "5dbc8959427416b8ee09a100d7a8588c00fb2e26" + "reference": "a49db6f0a5033aef5143295342f1c95521b075ff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/firebase/php-jwt/zipball/5dbc8959427416b8ee09a100d7a8588c00fb2e26", - "reference": "5dbc8959427416b8ee09a100d7a8588c00fb2e26", + "url": "https://api.github.com/repos/firebase/php-jwt/zipball/a49db6f0a5033aef5143295342f1c95521b075ff", + "reference": "a49db6f0a5033aef5143295342f1c95521b075ff", "shasum": "" }, "require": { @@ -63,7 +63,11 @@ "jwt", "php" ], - "time": "2023-07-14T18:33:00+00:00" + "support": { + "issues": "https://github.com/firebase/php-jwt/issues", + "source": "https://github.com/firebase/php-jwt/tree/v6.10.0" + }, + "time": "2023-12-01T16:26:39+00:00" }, { "name": "google/protobuf", @@ -198,6 +202,9 @@ "psr", "psr-3" ], + "support": { + "source": "https://github.com/php-fig/log/tree/1.1.4" + }, "time": "2021-05-03T11:20:27+00:00" }, { @@ -246,22 +253,25 @@ "psr-16", "simple-cache" ], + "support": { + "source": "https://github.com/php-fig/simple-cache/tree/master" + }, "time": "2017-10-23T01:57:42+00:00" } ], "packages-dev": [ { "name": "composer/ca-bundle", - "version": "1.3.7", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/composer/ca-bundle.git", - "reference": "76e46335014860eec1aa5a724799a00a2e47cc85" + "reference": "b66d11b7479109ab547f9405b97205640b17d385" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/76e46335014860eec1aa5a724799a00a2e47cc85", - "reference": "76e46335014860eec1aa5a724799a00a2e47cc85", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/b66d11b7479109ab547f9405b97205640b17d385", + "reference": "b66d11b7479109ab547f9405b97205640b17d385", "shasum": "" }, "require": { @@ -273,7 +283,7 @@ "phpstan/phpstan": "^0.12.55", "psr/log": "^1.0", "symfony/phpunit-bridge": "^4.2 || ^5", - "symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0 || ^6.0" + "symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0" }, "type": "library", "extra": { @@ -305,6 +315,11 @@ "ssl", "tls" ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/ca-bundle/issues", + "source": "https://github.com/composer/ca-bundle/tree/1.4.0" + }, "funding": [ { "url": "https://packagist.com", @@ -319,7 +334,7 @@ "type": "tidelift" } ], - "time": "2023-08-30T09:31:38+00:00" + "time": "2023-12-18T12:05:55+00:00" }, { "name": "composer/class-map-generator", @@ -374,6 +389,10 @@ "keywords": [ "classmap" ], + "support": { + "issues": "https://github.com/composer/class-map-generator/issues", + "source": "https://github.com/composer/class-map-generator/tree/1.1.0" + }, "funding": [ { "url": "https://packagist.com", @@ -392,16 +411,16 @@ }, { "name": "composer/composer", - "version": "2.6.4", + "version": "2.7.1", "source": { "type": "git", "url": "https://github.com/composer/composer.git", - "reference": "d75d17c16a863438027d1d96401cddcd6aa5bb60" + "reference": "aaf6ed5ccd27c23f79a545e351b4d7842a99d0bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/composer/zipball/d75d17c16a863438027d1d96401cddcd6aa5bb60", - "reference": "d75d17c16a863438027d1d96401cddcd6aa5bb60", + "url": "https://api.github.com/repos/composer/composer/zipball/aaf6ed5ccd27c23f79a545e351b4d7842a99d0bc", + "reference": "aaf6ed5ccd27c23f79a545e351b4d7842a99d0bc", "shasum": "" }, "require": { @@ -433,7 +452,7 @@ "phpstan/phpstan-phpunit": "^1.0", "phpstan/phpstan-strict-rules": "^1", "phpstan/phpstan-symfony": "^1.2.10", - "symfony/phpunit-bridge": "^6.0 || ^7" + "symfony/phpunit-bridge": "^6.4.1 || ^7.0.1" }, "suggest": { "ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages", @@ -446,7 +465,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.6-dev" + "dev-main": "2.7-dev" }, "phpstan": { "includes": [ @@ -482,6 +501,12 @@ "dependency", "package" ], + "support": { + "irc": "ircs://irc.libera.chat:6697/composer", + "issues": "https://github.com/composer/composer/issues", + "security": "https://github.com/composer/composer/security/policy", + "source": "https://github.com/composer/composer/tree/2.7.1" + }, "funding": [ { "url": "https://packagist.com", @@ -496,7 +521,7 @@ "type": "tidelift" } ], - "time": "2023-09-29T08:54:47+00:00" + "time": "2024-02-09T14:26:28+00:00" }, { "name": "composer/metadata-minifier", @@ -547,6 +572,10 @@ "composer", "compression" ], + "support": { + "issues": "https://github.com/composer/metadata-minifier/issues", + "source": "https://github.com/composer/metadata-minifier/tree/1.0.0" + }, "funding": [ { "url": "https://packagist.com", @@ -565,16 +594,16 @@ }, { "name": "composer/pcre", - "version": "3.1.0", + "version": "3.1.1", "source": { "type": "git", "url": "https://github.com/composer/pcre.git", - "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2" + "reference": "00104306927c7a0919b4ced2aaa6782c1e61a3c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", - "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", + "url": "https://api.github.com/repos/composer/pcre/zipball/00104306927c7a0919b4ced2aaa6782c1e61a3c9", + "reference": "00104306927c7a0919b4ced2aaa6782c1e61a3c9", "shasum": "" }, "require": { @@ -614,6 +643,10 @@ "regex", "regular expression" ], + "support": { + "issues": "https://github.com/composer/pcre/issues", + "source": "https://github.com/composer/pcre/tree/3.1.1" + }, "funding": [ { "url": "https://packagist.com", @@ -628,7 +661,7 @@ "type": "tidelift" } ], - "time": "2022-11-17T09:50:14+00:00" + "time": "2023-10-11T07:11:09+00:00" }, { "name": "composer/semver", @@ -690,6 +723,11 @@ "validation", "versioning" ], + "support": { + "irc": "ircs://irc.libera.chat:6697/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/3.4.0" + }, "funding": [ { "url": "https://packagist.com", @@ -708,16 +746,16 @@ }, { "name": "composer/spdx-licenses", - "version": "1.5.7", + "version": "1.5.8", "source": { "type": "git", "url": "https://github.com/composer/spdx-licenses.git", - "reference": "c848241796da2abf65837d51dce1fae55a960149" + "reference": "560bdcf8deb88ae5d611c80a2de8ea9d0358cc0a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/c848241796da2abf65837d51dce1fae55a960149", - "reference": "c848241796da2abf65837d51dce1fae55a960149", + "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/560bdcf8deb88ae5d611c80a2de8ea9d0358cc0a", + "reference": "560bdcf8deb88ae5d611c80a2de8ea9d0358cc0a", "shasum": "" }, "require": { @@ -765,6 +803,11 @@ "spdx", "validator" ], + "support": { + "irc": "ircs://irc.libera.chat:6697/composer", + "issues": "https://github.com/composer/spdx-licenses/issues", + "source": "https://github.com/composer/spdx-licenses/tree/1.5.8" + }, "funding": [ { "url": "https://packagist.com", @@ -779,7 +822,7 @@ "type": "tidelift" } ], - "time": "2022-05-23T07:37:50+00:00" + "time": "2023-11-20T07:44:33+00:00" }, { "name": "composer/xdebug-handler", @@ -826,6 +869,11 @@ "Xdebug", "performance" ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/xdebug-handler/issues", + "source": "https://github.com/composer/xdebug-handler/tree/3.0.3" + }, "funding": [ { "url": "https://packagist.com", @@ -892,6 +940,10 @@ "constructor", "instantiate" ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.5.0" + }, "funding": [ { "url": "https://www.doctrine-project.org/sponsorship.html", @@ -972,6 +1024,10 @@ "json", "schema" ], + "support": { + "issues": "https://github.com/justinrainbow/json-schema/issues", + "source": "https://github.com/justinrainbow/json-schema/tree/v5.2.13" + }, "time": "2023-09-26T02:20:38+00:00" }, { @@ -1021,6 +1077,10 @@ "object", "object graph" ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" + }, "funding": [ { "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", @@ -1031,25 +1091,27 @@ }, { "name": "nikic/php-parser", - "version": "v4.17.1", + "version": "v5.0.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d" + "reference": "4a21235f7e56e713259a6f76bf4b5ea08502b9dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", - "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4a21235f7e56e713259a6f76bf4b5ea08502b9dc", + "reference": "4a21235f7e56e713259a6f76bf4b5ea08502b9dc", "shasum": "" }, "require": { + "ext-ctype": "*", + "ext-json": "*", "ext-tokenizer": "*", - "php": ">=7.0" + "php": ">=7.4" }, "require-dev": { "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" }, "bin": [ "bin/php-parse" @@ -1057,7 +1119,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.9-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -1079,7 +1141,11 @@ "parser", "php" ], - "time": "2023-08-13T19:53:39+00:00" + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v5.0.0" + }, + "time": "2024-01-07T17:17:35+00:00" }, { "name": "phar-io/manifest", @@ -1135,6 +1201,10 @@ } ], "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.3" + }, "time": "2021-07-20T11:28:43+00:00" }, { @@ -1182,27 +1252,31 @@ } ], "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.2.1" + }, "time": "2022-02-21T01:04:05+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.29", + "version": "9.2.30", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76" + "reference": "ca2bd87d2f9215904682a9cb9bb37dda98e76089" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6a3a87ac2bbe33b25042753df8195ba4aa534c76", - "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ca2bd87d2f9215904682a9cb9bb37dda98e76089", + "reference": "ca2bd87d2f9215904682a9cb9bb37dda98e76089", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.15", + "nikic/php-parser": "^4.18 || ^5.0", "php": ">=7.3", "phpunit/php-file-iterator": "^3.0.3", "phpunit/php-text-template": "^2.0.2", @@ -1249,13 +1323,18 @@ "testing", "xunit" ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.30" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" } ], - "time": "2023-09-19T04:57:46+00:00" + "time": "2023-12-22T06:47:57+00:00" }, { "name": "phpunit/php-file-iterator", @@ -1305,6 +1384,10 @@ "filesystem", "iterator" ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -1364,6 +1447,10 @@ "keywords": [ "process" ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -1419,6 +1506,10 @@ "keywords": [ "template" ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -1474,6 +1565,10 @@ "keywords": [ "timer" ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -1484,16 +1579,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.13", + "version": "9.6.16", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "f3d767f7f9e191eab4189abe41ab37797e30b1be" + "reference": "3767b2c56ce02d01e3491046f33466a1ae60a37f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f3d767f7f9e191eab4189abe41ab37797e30b1be", - "reference": "f3d767f7f9e191eab4189abe41ab37797e30b1be", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3767b2c56ce02d01e3491046f33466a1ae60a37f", + "reference": "3767b2c56ce02d01e3491046f33466a1ae60a37f", "shasum": "" }, "require": { @@ -1564,6 +1659,11 @@ "testing", "xunit" ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.16" + }, "funding": [ { "url": "https://phpunit.de/sponsors.html", @@ -1578,7 +1678,7 @@ "type": "tidelift" } ], - "time": "2023-09-19T05:39:22+00:00" + "time": "2024-01-19T07:03:14+00:00" }, { "name": "psr/container", @@ -1622,28 +1722,32 @@ "container-interop", "psr" ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/1.1.2" + }, "time": "2021-11-05T16:50:12+00:00" }, { "name": "react/promise", - "version": "v3.0.0", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/reactphp/promise.git", - "reference": "c86753c76fd3be465d93b308f18d189f01a22be4" + "reference": "e563d55d1641de1dea9f5e84f3cccc66d2bfe02c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/promise/zipball/c86753c76fd3be465d93b308f18d189f01a22be4", - "reference": "c86753c76fd3be465d93b308f18d189f01a22be4", + "url": "https://api.github.com/repos/reactphp/promise/zipball/e563d55d1641de1dea9f5e84f3cccc66d2bfe02c", + "reference": "e563d55d1641de1dea9f5e84f3cccc66d2bfe02c", "shasum": "" }, "require": { "php": ">=7.1.0" }, "require-dev": { - "phpstan/phpstan": "1.10.20 || 1.4.10", - "phpunit/phpunit": "^9.5 || ^7.5" + "phpstan/phpstan": "1.10.39 || 1.4.10", + "phpunit/phpunit": "^9.6 || ^7.5" }, "type": "library", "autoload": { @@ -1685,13 +1789,17 @@ "promise", "promises" ], + "support": { + "issues": "https://github.com/reactphp/promise/issues", + "source": "https://github.com/reactphp/promise/tree/v3.1.0" + }, "funding": [ { "url": "https://opencollective.com/reactphp", "type": "open_collective" } ], - "time": "2023-07-11T16:12:49+00:00" + "time": "2023-11-16T16:21:57+00:00" }, { "name": "sebastian/cli-parser", @@ -1737,6 +1845,10 @@ ], "description": "Library for parsing CLI options", "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -1789,6 +1901,10 @@ ], "description": "Collection of value objects that represent the PHP code units", "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -1840,6 +1956,10 @@ ], "description": "Looks up which function or method a line of code belongs to", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -1910,6 +2030,10 @@ "compare", "equality" ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -1920,20 +2044,20 @@ }, { "name": "sebastian/complexity", - "version": "2.0.2", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a", + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a", "shasum": "" }, "require": { - "nikic/php-parser": "^4.7", + "nikic/php-parser": "^4.18 || ^5.0", "php": ">=7.3" }, "require-dev": { @@ -1963,13 +2087,17 @@ ], "description": "Library for calculating the complexity of PHP code units", "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.3" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" } ], - "time": "2020-10-26T15:52:27+00:00" + "time": "2023-12-22T06:19:30+00:00" }, { "name": "sebastian/diff", @@ -2025,6 +2153,10 @@ "unidiff", "unified diff" ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.5" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -2084,6 +2216,10 @@ "environment", "hhvm" ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -2157,6 +2293,10 @@ "export", "exporter" ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -2217,6 +2357,10 @@ "keywords": [ "global state" ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.6" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -2227,20 +2371,20 @@ }, { "name": "sebastian/lines-of-code", - "version": "1.0.3", + "version": "1.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5", + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5", "shasum": "" }, "require": { - "nikic/php-parser": "^4.6", + "nikic/php-parser": "^4.18 || ^5.0", "php": ">=7.3" }, "require-dev": { @@ -2270,13 +2414,17 @@ ], "description": "Library for counting the lines of code in PHP source code", "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.4" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" } ], - "time": "2020-11-28T06:42:11+00:00" + "time": "2023-12-22T06:20:34+00:00" }, { "name": "sebastian/object-enumerator", @@ -2323,6 +2471,10 @@ ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -2374,6 +2526,10 @@ ], "description": "Allows reflection of object attributes, including inherited and non-public ones", "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -2433,6 +2589,10 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "https://github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -2484,6 +2644,10 @@ ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "support": { + "issues": "https://github.com/sebastianbergmann/resource-operations/issues", + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -2536,6 +2700,10 @@ ], "description": "Collection of value objects that represent the types of the PHP type system", "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -2585,6 +2753,10 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -2595,16 +2767,16 @@ }, { "name": "seld/jsonlint", - "version": "1.10.0", + "version": "1.10.2", "source": { "type": "git", "url": "https://github.com/Seldaek/jsonlint.git", - "reference": "594fd6462aad8ecee0b45ca5045acea4776667f1" + "reference": "9bb7db07b5d66d90f6ebf542f09fc67d800e5259" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/594fd6462aad8ecee0b45ca5045acea4776667f1", - "reference": "594fd6462aad8ecee0b45ca5045acea4776667f1", + "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/9bb7db07b5d66d90f6ebf542f09fc67d800e5259", + "reference": "9bb7db07b5d66d90f6ebf542f09fc67d800e5259", "shasum": "" }, "require": { @@ -2631,7 +2803,7 @@ { "name": "Jordi Boggiano", "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" + "homepage": "https://seld.be" } ], "description": "JSON Linter", @@ -2641,6 +2813,10 @@ "parser", "validator" ], + "support": { + "issues": "https://github.com/Seldaek/jsonlint/issues", + "source": "https://github.com/Seldaek/jsonlint/tree/1.10.2" + }, "funding": [ { "url": "https://github.com/Seldaek", @@ -2651,7 +2827,7 @@ "type": "tidelift" } ], - "time": "2023-05-11T13:16:46+00:00" + "time": "2024-02-07T12:57:50+00:00" }, { "name": "seld/phar-utils", @@ -2695,6 +2871,10 @@ "keywords": [ "phar" ], + "support": { + "issues": "https://github.com/Seldaek/phar-utils/issues", + "source": "https://github.com/Seldaek/phar-utils/tree/1.2.1" + }, "time": "2022-08-31T10:31:18+00:00" }, { @@ -2752,20 +2932,24 @@ "sigterm", "unix" ], + "support": { + "issues": "https://github.com/Seldaek/signal-handler/issues", + "source": "https://github.com/Seldaek/signal-handler/tree/2.0.2" + }, "time": "2023-09-03T09:24:00+00:00" }, { "name": "symfony/console", - "version": "v5.4.28", + "version": "v5.4.35", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "f4f71842f24c2023b91237c72a365306f3c58827" + "reference": "dbdf6adcb88d5f83790e1efb57ef4074309d3931" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/f4f71842f24c2023b91237c72a365306f3c58827", - "reference": "f4f71842f24c2023b91237c72a365306f3c58827", + "url": "https://api.github.com/repos/symfony/console/zipball/dbdf6adcb88d5f83790e1efb57ef4074309d3931", + "reference": "dbdf6adcb88d5f83790e1efb57ef4074309d3931", "shasum": "" }, "require": { @@ -2834,6 +3018,9 @@ "console", "terminal" ], + "support": { + "source": "https://github.com/symfony/console/tree/v5.4.35" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -2848,7 +3035,7 @@ "type": "tidelift" } ], - "time": "2023-08-07T06:12:30+00:00" + "time": "2024-01-23T14:28:09+00:00" }, { "name": "symfony/deprecation-contracts", @@ -2898,6 +3085,9 @@ ], "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -2916,16 +3106,16 @@ }, { "name": "symfony/filesystem", - "version": "v5.4.25", + "version": "v5.4.35", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "0ce3a62c9579a53358d3a7eb6b3dfb79789a6364" + "reference": "5a553607d4ffbfa9c0ab62facadea296c9db7086" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/0ce3a62c9579a53358d3a7eb6b3dfb79789a6364", - "reference": "0ce3a62c9579a53358d3a7eb6b3dfb79789a6364", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/5a553607d4ffbfa9c0ab62facadea296c9db7086", + "reference": "5a553607d4ffbfa9c0ab62facadea296c9db7086", "shasum": "" }, "require": { @@ -2959,6 +3149,9 @@ ], "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/filesystem/tree/v5.4.35" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -2973,20 +3166,20 @@ "type": "tidelift" } ], - "time": "2023-05-31T13:04:02+00:00" + "time": "2024-01-23T13:51:25+00:00" }, { "name": "symfony/finder", - "version": "v5.4.27", + "version": "v5.4.35", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "ff4bce3c33451e7ec778070e45bd23f74214cd5d" + "reference": "abe6d6f77d9465fed3cd2d029b29d03b56b56435" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/ff4bce3c33451e7ec778070e45bd23f74214cd5d", - "reference": "ff4bce3c33451e7ec778070e45bd23f74214cd5d", + "url": "https://api.github.com/repos/symfony/finder/zipball/abe6d6f77d9465fed3cd2d029b29d03b56b56435", + "reference": "abe6d6f77d9465fed3cd2d029b29d03b56b56435", "shasum": "" }, "require": { @@ -3019,6 +3212,9 @@ ], "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/finder/tree/v5.4.35" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -3033,20 +3229,20 @@ "type": "tidelift" } ], - "time": "2023-07-31T08:02:31+00:00" + "time": "2024-01-23T13:51:25+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb" + "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", - "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ef4d7e442ca910c4764bce785146269b30cb5fc4", + "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4", "shasum": "" }, "require": { @@ -3060,9 +3256,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -3098,6 +3291,9 @@ "polyfill", "portable" ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.29.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -3112,20 +3308,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "875e90aeea2777b6f135677f618529449334a612" + "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/875e90aeea2777b6f135677f618529449334a612", - "reference": "875e90aeea2777b6f135677f618529449334a612", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/32a9da87d7b3245e09ac426c83d334ae9f06f80f", + "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f", "shasum": "" }, "require": { @@ -3136,9 +3332,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -3176,6 +3369,9 @@ "portable", "shim" ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.29.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -3190,20 +3386,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92" + "reference": "bc45c394692b948b4d383a08d7753968bed9a83d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", - "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/bc45c394692b948b4d383a08d7753968bed9a83d", + "reference": "bc45c394692b948b4d383a08d7753968bed9a83d", "shasum": "" }, "require": { @@ -3214,9 +3410,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -3257,6 +3450,9 @@ "portable", "shim" ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.29.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -3271,20 +3467,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "42292d99c55abe617799667f454222c54c60e229" + "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", - "reference": "42292d99c55abe617799667f454222c54c60e229", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec", + "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec", "shasum": "" }, "require": { @@ -3298,9 +3494,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -3337,6 +3530,9 @@ "portable", "shim" ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -3351,20 +3547,20 @@ "type": "tidelift" } ], - "time": "2023-07-28T09:04:16+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5" + "reference": "21bd091060673a1177ae842c0ef8fe30893114d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fe2f306d1d9d346a7fee353d0d5012e401e984b5", - "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/21bd091060673a1177ae842c0ef8fe30893114d2", + "reference": "21bd091060673a1177ae842c0ef8fe30893114d2", "shasum": "" }, "require": { @@ -3372,9 +3568,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -3413,6 +3606,9 @@ "portable", "shim" ], + "support": { + "source": "https://github.com/symfony/polyfill-php73/tree/v1.29.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -3427,20 +3623,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5" + "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5", - "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", + "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", "shasum": "" }, "require": { @@ -3448,9 +3644,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -3493,6 +3686,9 @@ "portable", "shim" ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.29.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -3507,20 +3703,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-php81", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b" + "reference": "c565ad1e63f30e7477fc40738343c62b40bc672d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/7581cd600fa9fd681b797d00b02f068e2f13263b", - "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/c565ad1e63f30e7477fc40738343c62b40bc672d", + "reference": "c565ad1e63f30e7477fc40738343c62b40bc672d", "shasum": "" }, "require": { @@ -3528,9 +3724,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -3569,6 +3762,9 @@ "portable", "shim" ], + "support": { + "source": "https://github.com/symfony/polyfill-php81/tree/v1.29.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -3583,20 +3779,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/process", - "version": "v5.4.28", + "version": "v5.4.35", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "45261e1fccad1b5447a8d7a8e67aa7b4a9798b7b" + "reference": "cbc28e34015ad50166fc2f9c8962d28d0fe861eb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/45261e1fccad1b5447a8d7a8e67aa7b4a9798b7b", - "reference": "45261e1fccad1b5447a8d7a8e67aa7b4a9798b7b", + "url": "https://api.github.com/repos/symfony/process/zipball/cbc28e34015ad50166fc2f9c8962d28d0fe861eb", + "reference": "cbc28e34015ad50166fc2f9c8962d28d0fe861eb", "shasum": "" }, "require": { @@ -3628,6 +3824,9 @@ ], "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/process/tree/v5.4.35" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -3642,7 +3841,7 @@ "type": "tidelift" } ], - "time": "2023-08-07T10:36:04+00:00" + "time": "2024-01-23T13:51:25+00:00" }, { "name": "symfony/service-contracts", @@ -3708,6 +3907,9 @@ "interoperability", "standards" ], + "support": { + "source": "https://github.com/symfony/service-contracts/tree/v2.5.2" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -3726,16 +3928,16 @@ }, { "name": "symfony/string", - "version": "v5.4.26", + "version": "v5.4.35", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "1181fe9270e373537475e826873b5867b863883c" + "reference": "c209c4d0559acce1c9a2067612cfb5d35756edc2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/1181fe9270e373537475e826873b5867b863883c", - "reference": "1181fe9270e373537475e826873b5867b863883c", + "url": "https://api.github.com/repos/symfony/string/zipball/c209c4d0559acce1c9a2067612cfb5d35756edc2", + "reference": "c209c4d0559acce1c9a2067612cfb5d35756edc2", "shasum": "" }, "require": { @@ -3791,6 +3993,9 @@ "utf-8", "utf8" ], + "support": { + "source": "https://github.com/symfony/string/tree/v5.4.35" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -3805,20 +4010,20 @@ "type": "tidelift" } ], - "time": "2023-06-28T12:46:07+00:00" + "time": "2024-01-23T13:51:25+00:00" }, { "name": "theseer/tokenizer", - "version": "1.2.1", + "version": "1.2.2", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/b2ad5003ca10d4ee50a12da31de12a5774ba6b96", + "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96", "shasum": "" }, "require": { @@ -3845,13 +4050,17 @@ } ], "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.2.2" + }, "funding": [ { "url": "https://github.com/theseer", "type": "github" } ], - "time": "2021-07-28T10:34:58+00:00" + "time": "2023-11-20T00:12:19+00:00" } ], "aliases": [], @@ -3864,5 +4073,8 @@ "ext-grpc": "*" }, "platform-dev": [], - "plugin-api-version": "1.1.0" + "platform-overrides": { + "php": "7.4.15" + }, + "plugin-api-version": "2.6.0" } diff --git a/src/Cache/CacheClient.php b/src/Cache/CacheClient.php index 62f0ef97..8cf303ae 100644 --- a/src/Cache/CacheClient.php +++ b/src/Cache/CacheClient.php @@ -14,6 +14,7 @@ use Momento\Cache\CacheOperationTypes\DictionarySetFieldResponse; use Momento\Cache\CacheOperationTypes\DictionarySetFieldsResponse; use Momento\Cache\CacheOperationTypes\FlushCacheResponse; +use Momento\Cache\CacheOperationTypes\GetBatchResponse; use Momento\Cache\CacheOperationTypes\ResponseFuture; use Momento\Cache\CacheOperationTypes\GetResponse; use Momento\Cache\CacheOperationTypes\IncrementResponse; @@ -28,6 +29,7 @@ use Momento\Cache\CacheOperationTypes\ListRemoveValueResponse; use Momento\Cache\CacheOperationTypes\SetAddElementResponse; use Momento\Cache\CacheOperationTypes\SetAddElementsResponse; +use Momento\Cache\CacheOperationTypes\SetBatchResponse; use Momento\Cache\CacheOperationTypes\SetFetchResponse; use Momento\Cache\CacheOperationTypes\SetIfNotExistsResponse; use Momento\Cache\CacheOperationTypes\SetLengthResponse; @@ -1168,4 +1170,106 @@ private function getNextDataClient(): ScsDataClient $this->nextDataClientIndex = ($this->nextDataClientIndex + 1) % count($this->dataClients); return $client; } + + /** + * Gets the cache values stored for given keys. + * + * @param string $cacheName Name of the cache to perform the lookup in. + * @param array $keys The keys to look up. + * @return ResponseFuture A waitable future which will provide + * the result of the get operations upon a blocking call to wait. + * $response = $responseFuture->wait(); + * } + * The response represents the result of the get operation and stores the + * retrieved value. This result is resolved to a type-safe object of one of + * the following types:
+ * * GetBatchSuccess
+ * * GetBatchError
+ * Pattern matching can be to operate on the appropriate subtype:
+ * if ($success = $response->asSuccess()) {
+ *   $results = $success->results();
+ *   $values = $success->values();
+ * } elseif ($error = $response->asError()) {
+ *   // handle error response
+ * }
+ * If inspection of the response is not required, one need not call wait as + * we implicitly wait for completion of the request on destruction of the + * response future. + */ + public function getBatchAsync(string $cacheName, array $keys): ResponseFuture + { + return $this->getNextDataClient()->getBatch($cacheName, $keys); + } + + /** + * Gets the cache value stored for a given key. + * + * @param string $cacheName Name of the cache to perform the lookup in. + * @param array $keys The key to look up. + * @return GetBatchResponse Represents the result of the get operation and stores the retrieved value. This + * result is resolved to a type-safe object of one of the following types:
+ * * GetBatchSuccess
+ * * GetBatchError
+ * Pattern matching can be to operate on the appropriate subtype:
+ * if ($success = $response->asSuccess()) {
+ *   $results = $success->results();
+ *   $values = $success->values();
+ * } elseif ($error = $response->asError()) {
+ *   // handle error response
+ * }
+ */ + public function getBatch(string $cacheName, array $keys): GetBatchResponse + { + return $this->getBatchAsync($cacheName, $keys)->wait(); + } + + /** + * Sets the cache values for given keys. + * + * @param string $cacheName Name of the cache to set the values in. + * @param array $items The keys and values to set. + * @return ResponseFuture A waitable future which will provide + * the result of the set operations upon a blocking call to wait. + * $response = $responseFuture->wait(); + * } + * The response represents the result of the get operation and stores the + * retrieved value. This result is resolved to a type-safe object of one of + * the following types:
+ * * SetBatchSuccess
+ * * SetBatchError
+ * Pattern matching can be to operate on the appropriate subtype:
+ * if ($success = $response->asSuccess()) {
+ *   $results = $success->results();
+ * } elseif ($error = $response->asError()) {
+ *   // handle error response
+ * }
+ * If inspection of the response is not required, one need not call wait as + * we implicitly wait for completion of the request on destruction of the + * response future. + */ + public function setBatchAsync(string $cacheName, array $items, int $ttl = 0): ResponseFuture + { + return $this->getNextDataClient()->setBatch($cacheName, $items, $ttl); + } + + /** + * Sets the cache value stored for a given key. + * + * @param string $cacheName Name of the cache to set the values in. + * @param array $items The keys and values to set. + * @return SetBatchResponse Represents the result of the set operation. This + * result is resolved to a type-safe object of one of the following types:
+ * * SetBatchSuccess
+ * * SetBatchError
+ * Pattern matching can be to operate on the appropriate subtype:
+ * if ($success = $response->asSuccess()) {
+ *   $results = $success->results();
+ * } elseif ($error = $response->asError()) {
+ *   // handle error response
+ * }
+ */ + public function setBatch(string $cacheName, array $items, int $ttl = 0): SetBatchResponse + { + return $this->setBatchAsync($cacheName, $items, $ttl)->wait(); + } } diff --git a/src/Cache/CacheOperationTypes/CacheOperationTypes.php b/src/Cache/CacheOperationTypes/CacheOperationTypes.php index 4bf5737a..ed75f8b1 100644 --- a/src/Cache/CacheOperationTypes/CacheOperationTypes.php +++ b/src/Cache/CacheOperationTypes/CacheOperationTypes.php @@ -16,12 +16,12 @@ use Cache_client\_ListPushBackResponse; use Cache_client\_ListPushFrontResponse; use Cache_client\_SetFetchResponse; -use Cache_client\_SetIfNotExistsResponse; use Cache_client\_SetLengthResponse; use Cache_client\_SetResponse; use Cache_client\ECacheResult; use Closure; use Control_client\_ListCachesResponse; +use Generator; use Momento\Cache\Errors\SdkError; use Momento\Cache\Errors\UnknownError; use Throwable; @@ -2635,3 +2635,110 @@ class SetRemoveElementError extends SetRemoveElementResponse { use ErrorBody; } + + +abstract class GetBatchResponse extends ResponseBase +{ + /** + * @return GetBatchSuccess|null Returns the success subtype if the request was successful and null otherwise. + */ + public function asSuccess(): ?GetBatchSuccess + { + if ($this->isSuccess()) { + return $this; + } + return null; + } + + /** + * @return GetBatchError|null Returns the error subtype if the request returned an error and null otherwise. + */ + public function asError(): ?GetBatchError + { + if ($this->isError()) { + return $this; + } + return null; + } +} + +class GetBatchSuccess extends GetBatchResponse +{ + private array $values = []; + private array $results = []; + + public function __construct(array $responses) + { + parent::__construct(); + $this->results = $responses; + } + + public function results(): array + { + return $this->results; + } + + public function values(): array + { + if (!$this->values) { + $array = []; + foreach ($this->results as $result) { + $value = $result->asHit() ? $result->asHit()->valueString() : null; + $array[] = $value; + } + $this->values = $array; + } + return $this->values; + } +} + +class GetBatchError extends GetBatchResponse +{ + use ErrorBody; +} + +abstract class SetBatchResponse extends ResponseBase +{ + /** + * @return SetBatchSuccess|null Returns the success subtype if the request was successful and null otherwise. + */ + public function asSuccess(): ?SetBatchSuccess + { + if ($this->isSuccess()) { + return $this; + } + return null; + } + + /** + * @return SetBatchError|null Returns the error subtype if the request returned an error and null otherwise. + */ + public function asError(): ?SetBatchError + { + if ($this->isError()) { + return $this; + } + return null; + } +} + +class SetBatchSuccess extends SetBatchResponse +{ + private array $responses; + + public function __construct(array $responses) + { + parent::__construct(); + $this->responses = $responses; + } + + public function results(): array + { + return $this->responses; + } +} + +class SetBatchError extends SetBatchResponse +{ + use ErrorBody; +} diff --git a/src/Cache/Interceptors/AuthorizationInterceptor.php b/src/Cache/Interceptors/AuthorizationInterceptor.php index 80c4af21..1006f556 100644 --- a/src/Cache/Interceptors/AuthorizationInterceptor.php +++ b/src/Cache/Interceptors/AuthorizationInterceptor.php @@ -21,4 +21,9 @@ public function interceptUnaryUnary($method, $argument, $deserialize, $continuat return parent::interceptUnaryUnary($method, $argument, $deserialize, $continuation, $metadata, $options); } + public function interceptUnaryStream($method, $argument, $deserialize, $continuation, array $metadata = [], array $options = []) + { + $metadata["authorization"] = [$this->authToken]; + return parent::interceptUnaryStream($method, $argument, $deserialize, $continuation, $metadata, $options); + } } diff --git a/src/Cache/Internal/ScsDataClient.php b/src/Cache/Internal/ScsDataClient.php index 64e5310f..7fa60397 100644 --- a/src/Cache/Internal/ScsDataClient.php +++ b/src/Cache/Internal/ScsDataClient.php @@ -10,6 +10,7 @@ use Cache_client\_DictionaryGetRequest; use Cache_client\_DictionaryIncrementRequest; use Cache_client\_DictionarySetRequest; +use Cache_client\_GetBatchRequest; use Cache_client\_GetRequest; use Cache_client\_IncrementRequest; use Cache_client\_KeysExistRequest; @@ -20,6 +21,7 @@ use Cache_client\_ListPushBackRequest; use Cache_client\_ListPushFrontRequest; use Cache_client\_ListRemoveRequest; +use Cache_client\_SetBatchRequest; use Cache_client\_SetDifferenceRequest; use Cache_client\_SetDifferenceRequest\_Subtrahend; use Cache_client\_SetDifferenceRequest\_Subtrahend\_Set; @@ -62,6 +64,9 @@ use Momento\Cache\CacheOperationTypes\DictionarySetFieldsResponse; use Momento\Cache\CacheOperationTypes\DictionarySetFieldsError; use Momento\Cache\CacheOperationTypes\DictionarySetFieldsSuccess; +use Momento\Cache\CacheOperationTypes\GetBatchError; +use Momento\Cache\CacheOperationTypes\GetBatchResponse; +use Momento\Cache\CacheOperationTypes\GetBatchSuccess; use Momento\Cache\CacheOperationTypes\ResponseFuture; use Momento\Cache\CacheOperationTypes\GetResponse; use Momento\Cache\CacheOperationTypes\GetError; @@ -106,6 +111,9 @@ use Momento\Cache\CacheOperationTypes\SetAddElementsResponse; use Momento\Cache\CacheOperationTypes\SetAddElementsError; use Momento\Cache\CacheOperationTypes\SetAddElementsSuccess; +use Momento\Cache\CacheOperationTypes\SetBatchError; +use Momento\Cache\CacheOperationTypes\SetBatchResponse; +use Momento\Cache\CacheOperationTypes\SetBatchSuccess; use Momento\Cache\CacheOperationTypes\SetFetchResponse; use Momento\Cache\CacheOperationTypes\SetFetchError; use Momento\Cache\CacheOperationTypes\SetFetchHit; @@ -1093,6 +1101,113 @@ function () use ($call): SetRemoveElementResponse { ); } + /** + * @return ResponseFuture + */ + public function getBatch(string $cacheName, array $keys): ResponseFuture + { + try { + validateCacheName($cacheName); + validateKeys($keys); + + $getRequests = []; + foreach ($keys as $key) { + $getRequest = new _GetRequest(); + $getRequest->setCacheKey($key); + $getRequests[] = $getRequest; + } + + $getBatchRequest = new _GetBatchRequest(); + $getBatchRequest->setItems($getRequests); + $call = $this->grpcManager->client->GetBatch($getBatchRequest, ['cache' => [$cacheName]], ['timeout' => $this->timeout]); + } catch (SdkError $e) { + return ResponseFuture::createResolved(new GetBatchError($e)); + } catch (Exception $e) { + return ResponseFuture::createResolved(new GetBatchError(new UnknownError($e->getMessage(), 0, $e))); + } + + return ResponseFuture::createPending( + function () use ($call): GetBatchResponse { + try { + $results= []; + $responses = $call->responses(); + foreach ($responses as $response) { + if ($response->getResult() == ECacheResult::Hit) { + $value = new GetHit($response); + } elseif ($response->getResult() == ECacheResult::Miss) { + $value = new GetMiss(); + } else { + $value = new GetError(new UnknownError(strval($response->getResult()))); + } + $results[] = $value; + } + return new GetBatchSuccess($results); + } catch (SdkError $e) { + return new GetBatchError($e); + } catch (Exception $e) { + return new GetBatchError(new UnknownError($e->getMessage(), 0, $e)); + } + } + ); + + } + + /** + * @return ResponseFuture + */ + public function setBatch(string $cacheName, array $items, int $ttl = 0): ResponseFuture + { + try { + validateCacheName($cacheName); + validateKeys(array_keys($items)); + + $ttlMillis = $this->ttlToMillis($ttl); + $setRequests = []; + foreach ($items as $key => $value) { + $setRequest = new _SetRequest(); + $setRequest->setCacheKey($key); + $setRequest->setCacheBody($value); + $setRequest->setTtlMilliseconds($ttlMillis); + $setRequests[] = $setRequest; + } + $setBatchRequest = new _SetBatchRequest(); + $setBatchRequest->setItems($setRequests); + $call = $this->grpcManager->client->SetBatch($setBatchRequest, ['cache' => [$cacheName]], ['timeout' => $this->timeout]); + } catch (SdkError $e) { + return ResponseFuture::createResolved(new SetBatchError($e)); + } catch (Exception $e) { + return ResponseFuture::createResolved(new SetBatchError(new UnknownError($e->getMessage(), 0, $e))); + } + + return ResponseFuture::createPending( + function () use ($call): SetBatchResponse { + try { + $results = []; + $responses = $call->responses(); + foreach ($responses as $response) { + if ($response->getResult() == ECacheResult::Ok) { + $value = new SetSuccess(); + } else { + $value = new SetError(new UnknownError(strval($response->getResult()))); + } + $results[] = $value; + } + + $status = $call->getStatus(); + if ($status->code != 0) { + return new SetBatchError(new UnknownError($status->details)); + } + return new SetBatchSuccess($results); + } catch (SdkError $e) { + return new SetBatchError($e); + } catch (Exception $e) { + return new SetBatchError(new UnknownError($e->getMessage(), 0, $e)); + } + } + ); + + } + public function close(): void { $this->grpcManager->close(); diff --git a/src/Cache/Psr16CacheClient.php b/src/Cache/Psr16CacheClient.php index a42a851f..76c72bf0 100644 --- a/src/Cache/Psr16CacheClient.php +++ b/src/Cache/Psr16CacheClient.php @@ -12,287 +12,574 @@ use Psr\SimpleCache\CacheInterface; use function Momento\Utilities\validatePsr16Key; -class Psr16CacheClient implements CacheInterface -{ - - private CacheClient $momento; - private string $cacheName; - // PSR-16 spec requires a default of as close to "forever" as the engine allows. - // The below is set to a week and will be truncated as necessary for the cache - // backend in use. - private const DEFAULT_TTL_SECONDS = 604800; - private const DEFAULT_CACHE_NAME = "momento-psr16"; - private ?CacheException $lastError = null; - private bool $throwExceptions = true; - - /** - * @param IConfiguration $configuration - * @param ICredentialProvider $authProvider - * @param int|null $defaultTtlSeconds - * @param bool|null $throwExceptions - * @param string|null $cacheName - */ - public function __construct( - IConfiguration $configuration, - ICredentialProvider $authProvider, - ?int $defaultTtlSeconds, - ?bool $throwExceptions = null, - ?string $cacheName = null - ) +if (version_compare(PHP_VERSION, '8.0.0', '<')) { + class Psr16CacheClient implements CacheInterface { - $ttlSeconds = $defaultTtlSeconds ?? self::DEFAULT_TTL_SECONDS; - $this->momento = new CacheClient($configuration, $authProvider, $ttlSeconds); - if (!is_null($throwExceptions)) { - $this->throwExceptions = $throwExceptions; + + private CacheClient $momento; + private string $cacheName; + // PSR-16 spec requires a default of as close to "forever" as the engine allows. + // The below is set to a week and will be truncated as necessary for the cache + // backend in use. + private const DEFAULT_TTL_SECONDS = 604800; + private const DEFAULT_CACHE_NAME = "momento-psr16"; + private ?CacheException $lastError = null; + private bool $throwExceptions = true; + + /** + * @param IConfiguration $configuration + * @param ICredentialProvider $authProvider + * @param int|null $defaultTtlSeconds + * @param bool|null $throwExceptions + * @param string|null $cacheName + */ + public function __construct( + IConfiguration $configuration, + ICredentialProvider $authProvider, + ?int $defaultTtlSeconds, + ?bool $throwExceptions = null, + ?string $cacheName = null + ) + { + $ttlSeconds = $defaultTtlSeconds ?? self::DEFAULT_TTL_SECONDS; + $this->momento = new CacheClient($configuration, $authProvider, $ttlSeconds); + if (!is_null($throwExceptions)) { + $this->throwExceptions = $throwExceptions; + } + $this->cacheName = $cacheName ?? self::DEFAULT_CACHE_NAME; + $response = $this->momento->createCache($this->cacheName); + if ($error = $response->asError()) { + $this->throwExceptions = true; + $this->handleCacheError($error); + } } - $this->cacheName = $cacheName ?? self::DEFAULT_CACHE_NAME; - $response = $this->momento->createCache($this->cacheName); - if ($error = $response->asError()) { - $this->throwExceptions = true; - $this->handleCacheError($error); + + /** + * Coverts a DateInterval object into seconds. + * + * @param DateInterval $di + * @return int + */ + public static function dateIntervalToSeconds(DateInterval $di): int + { + $secs = $di->days * 86400 + $di->h * 3600 + $di->i * 60 + $di->s; + if ($di->invert) { + $secs *= -1; + } + return $secs; } - } - /** - * Coverts a DateInterval object into seconds. - * - * @param DateInterval $di - * @return int - */ - public static function dateIntervalToSeconds(DateInterval $di): int - { - $secs = $di->days * 86400 + $di->h * 3600 + $di->i * 60 + $di->s; - if ($di->invert) { - $secs *= -1; + /** + * Either throws or returns an exception derived from a cache client error response, + * depending on the value of the $throwExceptions property. + * + * @param ResponseBase $err + * @return void + */ + private function handleCacheError(ResponseBase $err): void + { + $exception = new CacheException($err->message(), 0, $err->innerException()); + if ($this->throwExceptions) { + throw $exception; + } + $this->lastError = $exception; } - return $secs; - } - /** - * Either throws or returns an exception derived from a cache client error response, - * depending on the value of the $throwExceptions property. - * - * @param ResponseBase $err - * @return void - */ - private function handleCacheError(ResponseBase $err): void - { - $exception = new CacheException($err->message(), 0, $err->innerException()); - if ($this->throwExceptions) { - throw $exception; + /** + * If the $throwExceptions property is set to false, exceptions handled by the + * handleCacheError method are stored in a $lastError property. This method allows + * access to the exceptions, optionally clearing the property when the error is + * returned. + * + * If $throwExceptions is true, this method will always reurn null as the property will + * never be set. + * + * @param bool $clear_error + * @return CacheException|null + */ + public function getLastError(bool $clear_error = true): ?CacheException + { + if (!$this->throwExceptions) { + return null; + } + $error = $this->lastError; + if ($clear_error) { + $this->lastError = null; + } + return $error; } - $this->lastError = $exception; - } - /** - * If the $throwExceptions property is set to false, exceptions handled by the - * handleCacheError method are stored in a $lastError property. This method allows - * access to the exceptions, optionally clearing the property when the error is - * returned. - * - * If $throwExceptions is true, this method will always reurn null as the property will - * never be set. - * - * @param bool $clear_error - * @return CacheException|null - */ - public function getLastError(bool $clear_error = true): ?CacheException - { - if (!$this->throwExceptions) { - return null; + /** + * @inheritDoc + */ + public function get($key, $default = null) + { + validatePsr16Key($key); + $response = $this->momento->get($this->cacheName, $key); + if ($error = $response->asError()) { + $this->handleCacheError($error); + return $default; + } elseif ($response->asMiss()) { + return $default; + } + $hit = $response->asHit(); + return unserialize($hit->valueString()); } - $error = $this->lastError; - if ($clear_error) { - $this->lastError = null; + + /** + * @inheritDoc + */ + public function set($key, $value, $ttl = null): bool + { + validatePsr16Key($key); + if (is_null($ttl)) { + $ttl = self::DEFAULT_TTL_SECONDS; + } elseif ($ttl instanceof DateInterval) { + $ttl = self::dateIntervalToSeconds($ttl); + } + + if ($ttl <= 0) { + // according to the spec, setting an item with a 0 or negative ttl + // must immediately remove that item from the cache + return $this->delete($key); + } + + $response = $this->momento->set($this->cacheName, $key, serialize($value), $ttl); + if ($error = $response->asError()) { + $this->handleCacheError($error); + return false; + } + return true; } - return $error; - } - /** - * @inheritDoc - */ - public function get($key, $default = null) - { - validatePsr16Key($key); - $response = $this->momento->get($this->cacheName, $key); - if ($error = $response->asError()) { - $this->handleCacheError($error); - return $default; - } elseif ($response->asMiss()) { - return $default; + /** + * @inheritDoc + */ + public function delete($key): bool + { + validatePsr16Key($key); + $response = $this->momento->delete($this->cacheName, $key); + if ($error = $response->asError()) { + $this->handleCacheError($error); + return false; + } + return true; } - $hit = $response->asHit(); - return unserialize($hit->valueString()); - } - /** - * @inheritDoc - */ - public function set($key, $value, $ttl = null): bool - { - validatePsr16Key($key); - if (is_null($ttl)) { - $ttl = self::DEFAULT_TTL_SECONDS; - } elseif ($ttl instanceof DateInterval) { - $ttl = self::dateIntervalToSeconds($ttl); + /** + * The clear method is currently unimplemented. + * + * @throws NotImplementedException + */ + public function clear(): bool + { + throw new NotImplementedException("The clear() method is not currently implemented."); } - if ($ttl <= 0) { - // according to the spec, setting an item with a 0 or negative ttl - // must immediately remove that item from the cache - return $this->delete($key); + /** + * @inheritDoc + */ + public function getMultiple($keys, $default = null): iterable + { + $keyList = []; + + foreach ($keys as $key) { + validatePsr16Key($key); + $keyList[] = $key; + } + + $result = []; + + foreach (array_chunk($keyList, 100) as $keyChunk) { + $futures = []; + + foreach ($keyChunk as $key) { + $futures[$key] = $this->momento->getAsync(self::DEFAULT_CACHE_NAME, $key); + } + + foreach ($futures as $key => $future) { + $response = $future->wait(); + $error = $response->asError(); + if (null !== $error) { + $this->handleCacheError($error); + $result[$key] = $default; + } elseif (null !== $response->asMiss()) { + $result[$key] = $default; + } else { + $result[$key] = unserialize($response->asHit()->valueString()); + } + } + } + + return $result; } - $response = $this->momento->set($this->cacheName, $key, serialize($value), $ttl); - if ($error = $response->asError()) { - $this->handleCacheError($error); - return false; + /** + * @inheritDoc + */ + public function setMultiple($values, $ttl = null): bool + { + $keyValueMap = []; + + foreach ($values as $key => $value) { + validatePsr16Key($key); + $keyValueMap[$key] = $value; + } + + if (is_null($ttl)) { + $ttl = self::DEFAULT_TTL_SECONDS; + } elseif ($ttl instanceof DateInterval) { + $ttl = self::dateIntervalToSeconds($ttl); + } + + if ($ttl <= 0) { + return $this->deleteMultiple(array_keys($keyValueMap)); + } + + foreach (array_chunk($keyValueMap, 100, true) as $keyValueChunk) { + $futures = []; + + foreach ($keyValueChunk as $key => $value) { + $futures[$key] = $this->momento->setAsync(self::DEFAULT_CACHE_NAME, $key, serialize($value), $ttl); + } + + foreach ($futures as $key => $future) { + $response = $future->wait(); + $error = $response->asError(); + if (null !== $error) { + $this->handleCacheError($error); + return false; + } + } + } + + return true; } - return true; - } - /** - * @inheritDoc - */ - public function delete($key): bool - { - validatePsr16Key($key); - $response = $this->momento->delete($this->cacheName, $key); - if ($error = $response->asError()) { - $this->handleCacheError($error); - return false; + /** + * @inheritDoc + */ + public function deleteMultiple($keys): bool + { + $keyList = []; + + foreach ($keys as $key) { + validatePsr16Key($key); + $keyList[] = $key; + } + + foreach (array_chunk($keyList, 100) as $keyChunk) { + $futures = []; + + foreach ($keyChunk as $key) { + $futures[$key] = $this->momento->deleteAsync(self::DEFAULT_CACHE_NAME, $key); + } + + foreach ($futures as $key => $future) { + $response = $future->wait(); + $error = $response->asError(); + if (null !== $error) { + $this->handleCacheError($error); + return false; + } + } + } + + return true; } - return true; - } - /** - * The clear method is currently unimplemented. - * - * @throws NotImplementedException - */ - public function clear(): bool - { - throw new NotImplementedException("The clear() method is not currently implemented."); + /** + * @inheritDoc + */ + public function has($key): bool + { + validatePsr16Key($key); + return (bool)$this->get($key); + } } - - /** - * @inheritDoc - */ - public function getMultiple($keys, $default = null): iterable +} else { + class Psr16CacheClient implements CacheInterface { - $keyList = []; - foreach ($keys as $key) { - validatePsr16Key($key); - $keyList[] = $key; + private CacheClient $momento; + private string $cacheName; + // PSR-16 spec requires a default of as close to "forever" as the engine allows. + // The below is set to a week and will be truncated as necessary for the cache + // backend in use. + private const DEFAULT_TTL_SECONDS = 604800; + private const DEFAULT_CACHE_NAME = "momento-psr16"; + private ?CacheException $lastError = null; + private bool $throwExceptions = true; + + /** + * @param IConfiguration $configuration + * @param ICredentialProvider $authProvider + * @param int|null $defaultTtlSeconds + * @param bool|null $throwExceptions + * @param string|null $cacheName + */ + public function __construct( + IConfiguration $configuration, + ICredentialProvider $authProvider, + ?int $defaultTtlSeconds, + ?bool $throwExceptions = null, + ?string $cacheName = null + ) + { + $ttlSeconds = $defaultTtlSeconds ?? self::DEFAULT_TTL_SECONDS; + $this->momento = new CacheClient($configuration, $authProvider, $ttlSeconds); + if (!is_null($throwExceptions)) { + $this->throwExceptions = $throwExceptions; + } + $this->cacheName = $cacheName ?? self::DEFAULT_CACHE_NAME; + $response = $this->momento->createCache($this->cacheName); + if ($error = $response->asError()) { + $this->throwExceptions = true; + $this->handleCacheError($error); + } } - $result = []; + /** + * Coverts a DateInterval object into seconds. + * + * @param DateInterval $di + * @return int + */ + public static function dateIntervalToSeconds(DateInterval $di): int + { + $secs = $di->days * 86400 + $di->h * 3600 + $di->i * 60 + $di->s; + if ($di->invert) { + $secs *= -1; + } + return $secs; + } - foreach (array_chunk($keyList, 100) as $keyChunk) { - $futures = []; + /** + * Either throws or returns an exception derived from a cache client error response, + * depending on the value of the $throwExceptions property. + * + * @param ResponseBase $err + * @return void + */ + private function handleCacheError(ResponseBase $err): void + { + $exception = new CacheException($err->message(), 0, $err->innerException()); + if ($this->throwExceptions) { + throw $exception; + } + $this->lastError = $exception; + } - foreach ($keyChunk as $key) { - $futures[$key] = $this->momento->getAsync(self::DEFAULT_CACHE_NAME, $key); + /** + * If the $throwExceptions property is set to false, exceptions handled by the + * handleCacheError method are stored in a $lastError property. This method allows + * access to the exceptions, optionally clearing the property when the error is + * returned. + * + * If $throwExceptions is true, this method will always reurn null as the property will + * never be set. + * + * @param bool $clear_error + * @return CacheException|null + */ + public function getLastError(bool $clear_error = true): ?CacheException + { + if (!$this->throwExceptions) { + return null; } + $error = $this->lastError; + if ($clear_error) { + $this->lastError = null; + } + return $error; + } - foreach ($futures as $key => $future) { - $response = $future->wait(); - $error = $response->asError(); - if (null !== $error) { - $this->handleCacheError($error); - $result[$key] = $default; - } elseif (null !== $response->asMiss()) { - $result[$key] = $default; - } else { - $result[$key] = unserialize($response->asHit()->valueString()); - } + /** + * @inheritDoc + */ + public function get($key, $default = null): mixed + { + validatePsr16Key($key); + $response = $this->momento->get($this->cacheName, $key); + if ($error = $response->asError()) { + $this->handleCacheError($error); + return $default; + } elseif ($response->asMiss()) { + return $default; } + $hit = $response->asHit(); + return unserialize($hit->valueString()); } - return $result; - } + /** + * @inheritDoc + */ + public function set($key, $value, $ttl = null): bool + { + validatePsr16Key($key); + if (is_null($ttl)) { + $ttl = self::DEFAULT_TTL_SECONDS; + } elseif ($ttl instanceof DateInterval) { + $ttl = self::dateIntervalToSeconds($ttl); + } - /** - * @inheritDoc - */ - public function setMultiple($values, $ttl = null): bool - { - $keyValueMap = []; + if ($ttl <= 0) { + // according to the spec, setting an item with a 0 or negative ttl + // must immediately remove that item from the cache + return $this->delete($key); + } - foreach ($values as $key => $value) { - validatePsr16Key($key); - $keyValueMap[$key] = $value; + $response = $this->momento->set($this->cacheName, $key, serialize($value), $ttl); + if ($error = $response->asError()) { + $this->handleCacheError($error); + return false; + } + return true; } - if (is_null($ttl)) { - $ttl = self::DEFAULT_TTL_SECONDS; - } elseif ($ttl instanceof DateInterval) { - $ttl = self::dateIntervalToSeconds($ttl); + /** + * @inheritDoc + */ + public function delete($key): bool + { + validatePsr16Key($key); + $response = $this->momento->delete($this->cacheName, $key); + if ($error = $response->asError()) { + $this->handleCacheError($error); + return false; + } + return true; } - if ($ttl <= 0) { - return $this->deleteMultiple(array_keys($keyValueMap)); + /** + * The clear method is currently unimplemented. + * + * @throws NotImplementedException + */ + public function clear(): bool + { + throw new NotImplementedException("The clear() method is not currently implemented."); } - foreach (array_chunk($keyValueMap, 100, true) as $keyValueChunk) { - $futures = []; + /** + * @inheritDoc + */ + public function getMultiple($keys, $default = null): iterable + { + $keyList = []; - foreach ($keyValueChunk as $key => $value) { - $futures[$key] = $this->momento->setAsync(self::DEFAULT_CACHE_NAME, $key, serialize($value), $ttl); + foreach ($keys as $key) { + validatePsr16Key($key); + $keyList[] = $key; } - foreach ($futures as $key => $future) { - $response = $future->wait(); - $error = $response->asError(); - if (null !== $error) { - $this->handleCacheError($error); - return false; + $result = []; + + foreach (array_chunk($keyList, 100) as $keyChunk) { + $futures = []; + + foreach ($keyChunk as $key) { + $futures[$key] = $this->momento->getAsync(self::DEFAULT_CACHE_NAME, $key); + } + + foreach ($futures as $key => $future) { + $response = $future->wait(); + $error = $response->asError(); + if (null !== $error) { + $this->handleCacheError($error); + $result[$key] = $default; + } elseif (null !== $response->asMiss()) { + $result[$key] = $default; + } else { + $result[$key] = unserialize($response->asHit()->valueString()); + } } } + + return $result; } - return true; - } + /** + * @inheritDoc + */ + public function setMultiple($values, $ttl = null): bool + { + $keyValueMap = []; - /** - * @inheritDoc - */ - public function deleteMultiple($keys): bool - { - $keyList = []; + foreach ($values as $key => $value) { + validatePsr16Key($key); + $keyValueMap[$key] = $value; + } - foreach ($keys as $key) { - validatePsr16Key($key); - $keyList[] = $key; + if (is_null($ttl)) { + $ttl = self::DEFAULT_TTL_SECONDS; + } elseif ($ttl instanceof DateInterval) { + $ttl = self::dateIntervalToSeconds($ttl); + } + + if ($ttl <= 0) { + return $this->deleteMultiple(array_keys($keyValueMap)); + } + + foreach (array_chunk($keyValueMap, 100, true) as $keyValueChunk) { + $futures = []; + + foreach ($keyValueChunk as $key => $value) { + $futures[$key] = $this->momento->setAsync(self::DEFAULT_CACHE_NAME, $key, serialize($value), $ttl); + } + + foreach ($futures as $key => $future) { + $response = $future->wait(); + $error = $response->asError(); + if (null !== $error) { + $this->handleCacheError($error); + return false; + } + } + } + + return true; } - foreach (array_chunk($keyList, 100) as $keyChunk) { - $futures = []; + /** + * @inheritDoc + */ + public function deleteMultiple($keys): bool + { + $keyList = []; - foreach ($keyChunk as $key) { - $futures[$key] = $this->momento->deleteAsync(self::DEFAULT_CACHE_NAME, $key); + foreach ($keys as $key) { + validatePsr16Key($key); + $keyList[] = $key; } - foreach ($futures as $key => $future) { - $response = $future->wait(); - $error = $response->asError(); - if (null !== $error) { - $this->handleCacheError($error); - return false; + foreach (array_chunk($keyList, 100) as $keyChunk) { + $futures = []; + + foreach ($keyChunk as $key) { + $futures[$key] = $this->momento->deleteAsync(self::DEFAULT_CACHE_NAME, $key); + } + + foreach ($futures as $key => $future) { + $response = $future->wait(); + $error = $response->asError(); + if (null !== $error) { + $this->handleCacheError($error); + return false; + } } } - } - return true; - } + return true; + } - /** - * @inheritDoc - */ - public function has($key): bool - { - validatePsr16Key($key); - return (bool)$this->get($key); + /** + * @inheritDoc + */ + public function has($key): bool + { + validatePsr16Key($key); + return (bool)$this->get($key); + } } } diff --git a/tests/Cache/CacheClientTest.php b/tests/Cache/CacheClientTest.php index 4ab9758a..b3e3ac42 100644 --- a/tests/Cache/CacheClientTest.php +++ b/tests/Cache/CacheClientTest.php @@ -3,10 +3,13 @@ namespace Momento\Tests\Cache; +use Cache_client\_GetResponse; use Momento\Auth\AuthUtils; use Momento\Auth\EnvMomentoTokenProvider; use Momento\Cache\CacheOperationTypes\DictionaryGetFieldHit; use Momento\Cache\CacheOperationTypes\DictionaryGetFieldMiss; +use Momento\Cache\CacheOperationTypes\GetHit; +use Momento\Cache\CacheOperationTypes\GetMiss; use Momento\Cache\Errors\MomentoErrorCode; use Momento\Cache\CacheClient; use Momento\Config\Configuration; @@ -2333,4 +2336,160 @@ public function testSetDelete_SetExists_HappyPath() $this->assertNull($response->asError()); $this->assertNotNull($response->asMiss(), "Expected a miss but got $response."); } + + public function testGetBatch_HappyPath() + { + $cacheName = $this->TEST_CACHE_NAME; + $key1 = uniqid(); + $key2 = uniqid(); + $key3 = uniqid(); + $keys = [$key1, $key2, $key3]; + + $value1 = uniqid(); + $value2 = uniqid(); + $value3 = uniqid(); + $expectedValues = [$value1, $value2, $value3]; + + $response = $this->client->set($cacheName, $key1, $value1); + $this->assertNull($response->asError()); + $this->assertNotNull($response->asSuccess(), "Expected a success but got: $response"); + $this->assertEquals("$response", get_class($response)); + + $response = $this->client->set($cacheName, $key2, $value2); + $this->assertNull($response->asError()); + $this->assertNotNull($response->asSuccess(), "Expected a success but got: $response"); + $this->assertEquals("$response", get_class($response)); + + $response = $this->client->set($cacheName, $key3, $value3); + $this->assertNull($response->asError()); + $this->assertNotNull($response->asSuccess(), "Expected a success but got: $response"); + $this->assertEquals("$response", get_class($response)); + + + $response = $this->client->getBatch($cacheName, $keys); + + $this->assertNull($response->asError()); + $this->assertNotNull($response->asSuccess(), "Expected a success but got: $response"); + + $responses = $response->asSuccess()->values(); + $this->assertCount(sizeof($keys), $responses); + $this->assertEquals($responses, $expectedValues); + } + + public function testSetBatch_HappyPath() + { + $cacheName = $this->TEST_CACHE_NAME; + $key1 = uniqid(); + $key2 = uniqid(); + $key3 = uniqid(); + $keys = [$key1, $key2, $key3]; + + $value1 = uniqid(); + $value2 = uniqid(); + $value3 = uniqid(); + $expectedValues = [$value1, $value2, $value3]; + + $items = array( + $key1 => $value1, + $key2 => $value2, + $key3 => $value3 + ); + + $setBatchResponse = $this->client->setBatch($cacheName, $items, 60); + $this->assertNull($setBatchResponse->asError()); + $this->assertNotNull($setBatchResponse->asSuccess(), "Expected a success but got: $setBatchResponse"); + $setResponses = $setBatchResponse->asSuccess()->results(); + $this->assertCount(sizeof($keys), $setResponses); + + $getBatchResponse = $this->client->getBatch($cacheName, $keys); + $success = $getBatchResponse->asSuccess(); + $this->assertNull($getBatchResponse->asError()); + $this->assertNotNull($success, "Expected a success but got: $getBatchResponse"); + + $responses = $success->values(); + $this->assertCount(sizeof($keys), $responses); + $this->assertEquals($responses, $expectedValues); + } + + public function testGetBatchSetBatch() + { + $cacheName = $this->TEST_CACHE_NAME; + $key1 = uniqid(); + $key2 = uniqid(); + $key3 = uniqid(); + $keys = [$key1, $key2, $key3, "key4"]; + + $value1 = uniqid(); + $value2 = uniqid(); + $value3 = uniqid(); + $expectedValues = [$value1, $value2, $value3, null]; + + $items = array( + $key1 => $value1, + $key2 => $value2, + $key3 => $value3 + ); + + $setBatchResponse = $this->client->setBatch($cacheName, $items, 60); + $this->assertNull($setBatchResponse->asError()); + $this->assertNotNull($setBatchResponse->asSuccess(), "Expected a success but got: $setBatchResponse"); + + $getBatchResponse = $this->client->getBatch($cacheName, $keys); + $this->assertNull($getBatchResponse->asError()); + $this->assertNotNull($getBatchResponse->asSuccess(), "Expected a success but got: $getBatchResponse"); + + $successResponse = $getBatchResponse->asSuccess(); + + $results = $successResponse->results(); + $expectedClasses = [GetHit::class, GetHit::class, GetHit::class, GetMiss::class]; + + foreach ($expectedClasses as $index => $expectedClass) { + $this->assertInstanceOf($expectedClass, $results[$index]); + } + + $responses = $successResponse->values(); + $this->assertEquals($responses, $expectedValues); + } + + public function testGetBatchSetBatchAsync() + { + $cacheName = $this->TEST_CACHE_NAME; + $key1 = uniqid(); + $key2 = uniqid(); + $key3 = uniqid(); + $keys = [$key1, $key2, $key3, "key4"]; + + $value1 = uniqid(); + $value2 = uniqid(); + $value3 = uniqid(); + $expectedValues = [$value1, $value2, $value3, null]; + + $items = array( + $key1 => $value1, + $key2 => $value2, + $key3 => $value3 + ); + + $setBatchResponseFuture = $this->client->setBatchAsync($cacheName, $items, 60); + $setBatchResponse = $setBatchResponseFuture->wait(); + $this->assertNull($setBatchResponse->asError()); + $this->assertNotNull($setBatchResponse->asSuccess(), "Expected a success but got: $setBatchResponse"); + + $getBatchResponse = $this->client->getBatchAsync($cacheName, $keys); + $getBatchResponse = $getBatchResponse->wait(); + $this->assertNull($getBatchResponse->asError()); + $this->assertNotNull($getBatchResponse->asSuccess(), "Expected a success but got: $getBatchResponse"); + + $successResponse = $getBatchResponse->asSuccess(); + + $results = $successResponse->results(); + $expectedClasses = [GetHit::class, GetHit::class, GetHit::class, GetMiss::class]; + + foreach ($expectedClasses as $index => $expectedClass) { + $this->assertInstanceOf($expectedClass, $results[$index]); + } + + $responses = $successResponse->values(); + $this->assertEquals($responses, $expectedValues); + } } diff --git a/types/Auth/_GenerateApiTokenRequest.php b/types/Auth/_GenerateApiTokenRequest.php index 21534104..318bc982 100644 --- a/types/Auth/_GenerateApiTokenRequest.php +++ b/types/Auth/_GenerateApiTokenRequest.php @@ -18,9 +18,17 @@ class _GenerateApiTokenRequest extends \Google\Protobuf\Internal\Message */ protected $auth_token = ''; /** - * Generated from protobuf field .auth._GenerateApiTokenRequest.Permissions permissions = 4; + * Generated from protobuf field .permission_messages.Permissions permissions = 4; */ protected $permissions = null; + /** + * Generated from protobuf field string token_id = 5; + */ + protected $token_id = ''; + /** + * Generated from protobuf field string description = 6; + */ + protected $description = ''; protected $expiry; /** @@ -32,7 +40,9 @@ class _GenerateApiTokenRequest extends \Google\Protobuf\Internal\Message * @type \Auth\_GenerateApiTokenRequest\Never $never * @type \Auth\_GenerateApiTokenRequest\Expires $expires * @type string $auth_token - * @type \Auth\_GenerateApiTokenRequest\Permissions $permissions + * @type \Permission_messages\Permissions $permissions + * @type string $token_id + * @type string $description * } */ public function __construct($data = NULL) { @@ -117,8 +127,8 @@ public function setAuthToken($var) } /** - * Generated from protobuf field .auth._GenerateApiTokenRequest.Permissions permissions = 4; - * @return \Auth\_GenerateApiTokenRequest\Permissions|null + * Generated from protobuf field .permission_messages.Permissions permissions = 4; + * @return \Permission_messages\Permissions|null */ public function getPermissions() { @@ -136,18 +146,62 @@ public function clearPermissions() } /** - * Generated from protobuf field .auth._GenerateApiTokenRequest.Permissions permissions = 4; - * @param \Auth\_GenerateApiTokenRequest\Permissions $var + * Generated from protobuf field .permission_messages.Permissions permissions = 4; + * @param \Permission_messages\Permissions $var * @return $this */ public function setPermissions($var) { - GPBUtil::checkMessage($var, \Auth\_GenerateApiTokenRequest\Permissions::class); + GPBUtil::checkMessage($var, \Permission_messages\Permissions::class); $this->permissions = $var; return $this; } + /** + * Generated from protobuf field string token_id = 5; + * @return string + */ + public function getTokenId() + { + return $this->token_id; + } + + /** + * Generated from protobuf field string token_id = 5; + * @param string $var + * @return $this + */ + public function setTokenId($var) + { + GPBUtil::checkString($var, True); + $this->token_id = $var; + + return $this; + } + + /** + * Generated from protobuf field string description = 6; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Generated from protobuf field string description = 6; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + /** * @return string */ diff --git a/types/Auth/_GenerateApiTokenRequest/ExplicitPermissions.php b/types/Auth/_GenerateApiTokenRequest/ExplicitPermissions.php deleted file mode 100644 index fb92ff88..00000000 --- a/types/Auth/_GenerateApiTokenRequest/ExplicitPermissions.php +++ /dev/null @@ -1,61 +0,0 @@ -auth._GenerateApiTokenRequest.ExplicitPermissions - */ -class ExplicitPermissions extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field repeated .auth._GenerateApiTokenRequest.PermissionsType permissions = 1; - */ - private $permissions; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Auth\_GenerateApiTokenRequest\PermissionsType[]|\Google\Protobuf\Internal\RepeatedField $permissions - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Auth::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field repeated .auth._GenerateApiTokenRequest.PermissionsType permissions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPermissions() - { - return $this->permissions; - } - - /** - * Generated from protobuf field repeated .auth._GenerateApiTokenRequest.PermissionsType permissions = 1; - * @param \Auth\_GenerateApiTokenRequest\PermissionsType[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPermissions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Auth\_GenerateApiTokenRequest\PermissionsType::class); - $this->permissions = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ExplicitPermissions::class, \Auth\_GenerateApiTokenRequest_ExplicitPermissions::class); - diff --git a/types/Auth/_GenerateApiTokenRequest/PermissionsType.php b/types/Auth/_GenerateApiTokenRequest/PermissionsType.php deleted file mode 100644 index 93ec064e..00000000 --- a/types/Auth/_GenerateApiTokenRequest/PermissionsType.php +++ /dev/null @@ -1,99 +0,0 @@ -auth._GenerateApiTokenRequest.PermissionsType - */ -class PermissionsType extends \Google\Protobuf\Internal\Message -{ - protected $kind; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Auth\_GenerateApiTokenRequest\PermissionsType\CachePermissions $cache_permissions - * @type \Auth\_GenerateApiTokenRequest\PermissionsType\TopicPermissions $topic_permissions - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Auth::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field .auth._GenerateApiTokenRequest.PermissionsType.CachePermissions cache_permissions = 1; - * @return \Auth\_GenerateApiTokenRequest\PermissionsType\CachePermissions|null - */ - public function getCachePermissions() - { - return $this->readOneof(1); - } - - public function hasCachePermissions() - { - return $this->hasOneof(1); - } - - /** - * Generated from protobuf field .auth._GenerateApiTokenRequest.PermissionsType.CachePermissions cache_permissions = 1; - * @param \Auth\_GenerateApiTokenRequest\PermissionsType\CachePermissions $var - * @return $this - */ - public function setCachePermissions($var) - { - GPBUtil::checkMessage($var, \Auth\_GenerateApiTokenRequest\PermissionsType\CachePermissions::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Generated from protobuf field .auth._GenerateApiTokenRequest.PermissionsType.TopicPermissions topic_permissions = 2; - * @return \Auth\_GenerateApiTokenRequest\PermissionsType\TopicPermissions|null - */ - public function getTopicPermissions() - { - return $this->readOneof(2); - } - - public function hasTopicPermissions() - { - return $this->hasOneof(2); - } - - /** - * Generated from protobuf field .auth._GenerateApiTokenRequest.PermissionsType.TopicPermissions topic_permissions = 2; - * @param \Auth\_GenerateApiTokenRequest\PermissionsType\TopicPermissions $var - * @return $this - */ - public function setTopicPermissions($var) - { - GPBUtil::checkMessage($var, \Auth\_GenerateApiTokenRequest\PermissionsType\TopicPermissions::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getKind() - { - return $this->whichOneof("kind"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PermissionsType::class, \Auth\_GenerateApiTokenRequest_PermissionsType::class); - diff --git a/types/Auth/_GenerateApiTokenRequest/PermissionsType/CachePermissions.php b/types/Auth/_GenerateApiTokenRequest/PermissionsType/CachePermissions.php deleted file mode 100644 index bfb268b9..00000000 --- a/types/Auth/_GenerateApiTokenRequest/PermissionsType/CachePermissions.php +++ /dev/null @@ -1,61 +0,0 @@ -auth._GenerateApiTokenRequest.PermissionsType.CachePermissions - */ -class CachePermissions extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field .auth._GenerateApiTokenRequest.CacheRole role = 1; - */ - protected $role = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $role - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Auth::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field .auth._GenerateApiTokenRequest.CacheRole role = 1; - * @return int - */ - public function getRole() - { - return $this->role; - } - - /** - * Generated from protobuf field .auth._GenerateApiTokenRequest.CacheRole role = 1; - * @param int $var - * @return $this - */ - public function setRole($var) - { - GPBUtil::checkEnum($var, \Auth\_GenerateApiTokenRequest\CacheRole::class); - $this->role = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CachePermissions::class, \Auth\_GenerateApiTokenRequest_PermissionsType_CachePermissions::class); - diff --git a/types/Auth/_GenerateApiTokenRequest/PermissionsType/TopicPermissions.php b/types/Auth/_GenerateApiTokenRequest/PermissionsType/TopicPermissions.php deleted file mode 100644 index 2c237395..00000000 --- a/types/Auth/_GenerateApiTokenRequest/PermissionsType/TopicPermissions.php +++ /dev/null @@ -1,61 +0,0 @@ -auth._GenerateApiTokenRequest.PermissionsType.TopicPermissions - */ -class TopicPermissions extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field .auth._GenerateApiTokenRequest.TopicRole role = 1; - */ - protected $role = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $role - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Auth::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field .auth._GenerateApiTokenRequest.TopicRole role = 1; - * @return int - */ - public function getRole() - { - return $this->role; - } - - /** - * Generated from protobuf field .auth._GenerateApiTokenRequest.TopicRole role = 1; - * @param int $var - * @return $this - */ - public function setRole($var) - { - GPBUtil::checkEnum($var, \Auth\_GenerateApiTokenRequest\TopicRole::class); - $this->role = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TopicPermissions::class, \Auth\_GenerateApiTokenRequest_PermissionsType_TopicPermissions::class); - diff --git a/types/Auth/_GenerateApiTokenRequest_CacheRole.php b/types/Auth/_GenerateApiTokenRequest_CacheRole.php deleted file mode 100644 index 81343d42..00000000 --- a/types/Auth/_GenerateApiTokenRequest_CacheRole.php +++ /dev/null @@ -1,16 +0,0 @@ -_simpleRequest('/cache_client.Ping/Ping', + $argument, + ['\Cache_client\_PingResponse', 'decode'], + $metadata, $options); + } + +} diff --git a/types/Cache_client/Pubsub/PubsubClient.php b/types/Cache_client/Pubsub/PubsubClient.php new file mode 100644 index 00000000..78a508d3 --- /dev/null +++ b/types/Cache_client/Pubsub/PubsubClient.php @@ -0,0 +1,77 @@ +_simpleRequest('/cache_client.pubsub.Pubsub/Publish', + $argument, + ['\Cache_client\Pubsub\_Empty', 'decode'], + $metadata, $options); + } + + /** + * Subscribe to notifications from a topic. + * + * You will receive a stream of values and (hopefully occasional) discontinuities. + * Values will appear as copies of the payloads you Publish() to the topic. + * + * REQUIRES HEADER authorization: Momento auth token + * @param \Cache_client\Pubsub\_SubscriptionRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\ServerStreamingCall + */ + public function Subscribe(\Cache_client\Pubsub\_SubscriptionRequest $argument, + $metadata = [], $options = []) { + return $this->_serverStreamRequest('/cache_client.pubsub.Pubsub/Subscribe', + $argument, + ['\Cache_client\Pubsub\_SubscriptionItem', 'decode'], + $metadata, $options); + } + +} diff --git a/types/Cache_client/Pubsub/_Discontinuity.php b/types/Cache_client/Pubsub/_Discontinuity.php new file mode 100644 index 00000000..8f34e11f --- /dev/null +++ b/types/Cache_client/Pubsub/_Discontinuity.php @@ -0,0 +1,103 @@ +cache_client.pubsub._Discontinuity + */ +class _Discontinuity extends \Google\Protobuf\Internal\Message +{ + /** + * The last topic value sequence number known to have been attempted (if known, 0 otherwise). + * + * Generated from protobuf field uint64 last_topic_sequence = 1; + */ + protected $last_topic_sequence = 0; + /** + * The new topic sequence number after which TopicItems will ostensibly resume. + * + * Generated from protobuf field uint64 new_topic_sequence = 2; + */ + protected $new_topic_sequence = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $last_topic_sequence + * The last topic value sequence number known to have been attempted (if known, 0 otherwise). + * @type int|string $new_topic_sequence + * The new topic sequence number after which TopicItems will ostensibly resume. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Cachepubsub::initOnce(); + parent::__construct($data); + } + + /** + * The last topic value sequence number known to have been attempted (if known, 0 otherwise). + * + * Generated from protobuf field uint64 last_topic_sequence = 1; + * @return int|string + */ + public function getLastTopicSequence() + { + return $this->last_topic_sequence; + } + + /** + * The last topic value sequence number known to have been attempted (if known, 0 otherwise). + * + * Generated from protobuf field uint64 last_topic_sequence = 1; + * @param int|string $var + * @return $this + */ + public function setLastTopicSequence($var) + { + GPBUtil::checkUint64($var); + $this->last_topic_sequence = $var; + + return $this; + } + + /** + * The new topic sequence number after which TopicItems will ostensibly resume. + * + * Generated from protobuf field uint64 new_topic_sequence = 2; + * @return int|string + */ + public function getNewTopicSequence() + { + return $this->new_topic_sequence; + } + + /** + * The new topic sequence number after which TopicItems will ostensibly resume. + * + * Generated from protobuf field uint64 new_topic_sequence = 2; + * @param int|string $var + * @return $this + */ + public function setNewTopicSequence($var) + { + GPBUtil::checkUint64($var); + $this->new_topic_sequence = $var; + + return $this; + } + +} + diff --git a/types/Cache_client/Pubsub/_Empty.php b/types/Cache_client/Pubsub/_Empty.php new file mode 100644 index 00000000..d6659d89 --- /dev/null +++ b/types/Cache_client/Pubsub/_Empty.php @@ -0,0 +1,31 @@ +cache_client.pubsub._Empty + */ +class _Empty extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Cachepubsub::initOnce(); + parent::__construct($data); + } + +} + diff --git a/types/Cache_client/Pubsub/_Heartbeat.php b/types/Cache_client/Pubsub/_Heartbeat.php new file mode 100644 index 00000000..8f5e2ab9 --- /dev/null +++ b/types/Cache_client/Pubsub/_Heartbeat.php @@ -0,0 +1,39 @@ +cache_client.pubsub._Heartbeat + */ +class _Heartbeat extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Cachepubsub::initOnce(); + parent::__construct($data); + } + +} + diff --git a/types/Cache_client/Pubsub/_PublishRequest.php b/types/Cache_client/Pubsub/_PublishRequest.php new file mode 100644 index 00000000..70e0dff2 --- /dev/null +++ b/types/Cache_client/Pubsub/_PublishRequest.php @@ -0,0 +1,149 @@ +cache_client.pubsub._PublishRequest + */ +class _PublishRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cache namespace for the topic to which you want to send the value. + * + * Generated from protobuf field string cache_name = 1; + */ + protected $cache_name = ''; + /** + * The literal topic name to which you want to send the value. + * + * Generated from protobuf field string topic = 2; + */ + protected $topic = ''; + /** + * The value you want to send to the topic. All current subscribers will receive + * this, should the whims of the Internet prove merciful. + * + * Generated from protobuf field .cache_client.pubsub._TopicValue value = 3; + */ + protected $value = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $cache_name + * Cache namespace for the topic to which you want to send the value. + * @type string $topic + * The literal topic name to which you want to send the value. + * @type \Cache_client\Pubsub\_TopicValue $value + * The value you want to send to the topic. All current subscribers will receive + * this, should the whims of the Internet prove merciful. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Cachepubsub::initOnce(); + parent::__construct($data); + } + + /** + * Cache namespace for the topic to which you want to send the value. + * + * Generated from protobuf field string cache_name = 1; + * @return string + */ + public function getCacheName() + { + return $this->cache_name; + } + + /** + * Cache namespace for the topic to which you want to send the value. + * + * Generated from protobuf field string cache_name = 1; + * @param string $var + * @return $this + */ + public function setCacheName($var) + { + GPBUtil::checkString($var, True); + $this->cache_name = $var; + + return $this; + } + + /** + * The literal topic name to which you want to send the value. + * + * Generated from protobuf field string topic = 2; + * @return string + */ + public function getTopic() + { + return $this->topic; + } + + /** + * The literal topic name to which you want to send the value. + * + * Generated from protobuf field string topic = 2; + * @param string $var + * @return $this + */ + public function setTopic($var) + { + GPBUtil::checkString($var, True); + $this->topic = $var; + + return $this; + } + + /** + * The value you want to send to the topic. All current subscribers will receive + * this, should the whims of the Internet prove merciful. + * + * Generated from protobuf field .cache_client.pubsub._TopicValue value = 3; + * @return \Cache_client\Pubsub\_TopicValue|null + */ + public function getValue() + { + return $this->value; + } + + public function hasValue() + { + return isset($this->value); + } + + public function clearValue() + { + unset($this->value); + } + + /** + * The value you want to send to the topic. All current subscribers will receive + * this, should the whims of the Internet prove merciful. + * + * Generated from protobuf field .cache_client.pubsub._TopicValue value = 3; + * @param \Cache_client\Pubsub\_TopicValue $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkMessage($var, \Cache_client\Pubsub\_TopicValue::class); + $this->value = $var; + + return $this; + } + +} + diff --git a/types/Cache_client/Pubsub/_SubscriptionItem.php b/types/Cache_client/Pubsub/_SubscriptionItem.php new file mode 100644 index 00000000..9c8282f8 --- /dev/null +++ b/types/Cache_client/Pubsub/_SubscriptionItem.php @@ -0,0 +1,152 @@ +cache_client.pubsub._SubscriptionItem + */ +class _SubscriptionItem extends \Google\Protobuf\Internal\Message +{ + protected $kind; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Cache_client\Pubsub\_TopicItem $item + * The subscription has yielded an item you previously published. + * @type \Cache_client\Pubsub\_Discontinuity $discontinuity + * Momento wants to let you know we detected some possible inconsistency at this + * point in the subscription stream. + * A lack of a discontinuity does not mean the subscription is guaranteed to be + * strictly perfect, but the presence of a discontinuity is very likely to + * @type \Cache_client\Pubsub\_Heartbeat $heartbeat + * The stream is still working, there's nothing to see here. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Cachepubsub::initOnce(); + parent::__construct($data); + } + + /** + * The subscription has yielded an item you previously published. + * + * Generated from protobuf field .cache_client.pubsub._TopicItem item = 1; + * @return \Cache_client\Pubsub\_TopicItem|null + */ + public function getItem() + { + return $this->readOneof(1); + } + + public function hasItem() + { + return $this->hasOneof(1); + } + + /** + * The subscription has yielded an item you previously published. + * + * Generated from protobuf field .cache_client.pubsub._TopicItem item = 1; + * @param \Cache_client\Pubsub\_TopicItem $var + * @return $this + */ + public function setItem($var) + { + GPBUtil::checkMessage($var, \Cache_client\Pubsub\_TopicItem::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Momento wants to let you know we detected some possible inconsistency at this + * point in the subscription stream. + * A lack of a discontinuity does not mean the subscription is guaranteed to be + * strictly perfect, but the presence of a discontinuity is very likely to + * + * Generated from protobuf field .cache_client.pubsub._Discontinuity discontinuity = 2; + * @return \Cache_client\Pubsub\_Discontinuity|null + */ + public function getDiscontinuity() + { + return $this->readOneof(2); + } + + public function hasDiscontinuity() + { + return $this->hasOneof(2); + } + + /** + * Momento wants to let you know we detected some possible inconsistency at this + * point in the subscription stream. + * A lack of a discontinuity does not mean the subscription is guaranteed to be + * strictly perfect, but the presence of a discontinuity is very likely to + * + * Generated from protobuf field .cache_client.pubsub._Discontinuity discontinuity = 2; + * @param \Cache_client\Pubsub\_Discontinuity $var + * @return $this + */ + public function setDiscontinuity($var) + { + GPBUtil::checkMessage($var, \Cache_client\Pubsub\_Discontinuity::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The stream is still working, there's nothing to see here. + * + * Generated from protobuf field .cache_client.pubsub._Heartbeat heartbeat = 3; + * @return \Cache_client\Pubsub\_Heartbeat|null + */ + public function getHeartbeat() + { + return $this->readOneof(3); + } + + public function hasHeartbeat() + { + return $this->hasOneof(3); + } + + /** + * The stream is still working, there's nothing to see here. + * + * Generated from protobuf field .cache_client.pubsub._Heartbeat heartbeat = 3; + * @param \Cache_client\Pubsub\_Heartbeat $var + * @return $this + */ + public function setHeartbeat($var) + { + GPBUtil::checkMessage($var, \Cache_client\Pubsub\_Heartbeat::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getKind() + { + return $this->whichOneof("kind"); + } + +} + diff --git a/types/Cache_client/Pubsub/_SubscriptionRequest.php b/types/Cache_client/Pubsub/_SubscriptionRequest.php new file mode 100644 index 00000000..97fc8951 --- /dev/null +++ b/types/Cache_client/Pubsub/_SubscriptionRequest.php @@ -0,0 +1,151 @@ +cache_client.pubsub._SubscriptionRequest + */ +class _SubscriptionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cache namespace for the topic to which you want to subscribe. + * + * Generated from protobuf field string cache_name = 1; + */ + protected $cache_name = ''; + /** + * The literal topic name to which you want to subscribe. + * + * Generated from protobuf field string topic = 2; + */ + protected $topic = ''; + /** + * --> Providing this is not required. <-- + * If provided, attempt to reconnect to the topic and replay messages starting from + * the provided sequence number. You may get a discontinuity if some (or all) of the + * messages are not available. + * If not provided (or 0), the subscription will begin with the latest messages. + * + * Generated from protobuf field uint64 resume_at_topic_sequence_number = 3; + */ + protected $resume_at_topic_sequence_number = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $cache_name + * Cache namespace for the topic to which you want to subscribe. + * @type string $topic + * The literal topic name to which you want to subscribe. + * @type int|string $resume_at_topic_sequence_number + * --> Providing this is not required. <-- + * If provided, attempt to reconnect to the topic and replay messages starting from + * the provided sequence number. You may get a discontinuity if some (or all) of the + * messages are not available. + * If not provided (or 0), the subscription will begin with the latest messages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Cachepubsub::initOnce(); + parent::__construct($data); + } + + /** + * Cache namespace for the topic to which you want to subscribe. + * + * Generated from protobuf field string cache_name = 1; + * @return string + */ + public function getCacheName() + { + return $this->cache_name; + } + + /** + * Cache namespace for the topic to which you want to subscribe. + * + * Generated from protobuf field string cache_name = 1; + * @param string $var + * @return $this + */ + public function setCacheName($var) + { + GPBUtil::checkString($var, True); + $this->cache_name = $var; + + return $this; + } + + /** + * The literal topic name to which you want to subscribe. + * + * Generated from protobuf field string topic = 2; + * @return string + */ + public function getTopic() + { + return $this->topic; + } + + /** + * The literal topic name to which you want to subscribe. + * + * Generated from protobuf field string topic = 2; + * @param string $var + * @return $this + */ + public function setTopic($var) + { + GPBUtil::checkString($var, True); + $this->topic = $var; + + return $this; + } + + /** + * --> Providing this is not required. <-- + * If provided, attempt to reconnect to the topic and replay messages starting from + * the provided sequence number. You may get a discontinuity if some (or all) of the + * messages are not available. + * If not provided (or 0), the subscription will begin with the latest messages. + * + * Generated from protobuf field uint64 resume_at_topic_sequence_number = 3; + * @return int|string + */ + public function getResumeAtTopicSequenceNumber() + { + return $this->resume_at_topic_sequence_number; + } + + /** + * --> Providing this is not required. <-- + * If provided, attempt to reconnect to the topic and replay messages starting from + * the provided sequence number. You may get a discontinuity if some (or all) of the + * messages are not available. + * If not provided (or 0), the subscription will begin with the latest messages. + * + * Generated from protobuf field uint64 resume_at_topic_sequence_number = 3; + * @param int|string $var + * @return $this + */ + public function setResumeAtTopicSequenceNumber($var) + { + GPBUtil::checkUint64($var); + $this->resume_at_topic_sequence_number = $var; + + return $this; + } + +} + diff --git a/types/Cache_client/Pubsub/_TopicItem.php b/types/Cache_client/Pubsub/_TopicItem.php new file mode 100644 index 00000000..2730dff6 --- /dev/null +++ b/types/Cache_client/Pubsub/_TopicItem.php @@ -0,0 +1,173 @@ +cache_client.pubsub._TopicItem + */ +class _TopicItem extends \Google\Protobuf\Internal\Message +{ + /** + * Topic sequence numbers are **best-effort** and **informational**. + * They are not transactional. + * They exist: + * * to help reconnect to an existing topic while trying to avoid missing items. + * * to facilitate richer monitoring and logging. + * * to provide a best-effort awareness of stream contiguity, or lack thereof, + * in case you need to know. + * You can safely ignore them if none of that matters to you! + * + * Generated from protobuf field uint64 topic_sequence_number = 1; + */ + protected $topic_sequence_number = 0; + /** + * The value you previously published to this topic. + * + * Generated from protobuf field .cache_client.pubsub._TopicValue value = 2; + */ + protected $value = null; + /** + * Authenticated id from Publisher's disposable token + * + * Generated from protobuf field string publisher_id = 3; + */ + protected $publisher_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $topic_sequence_number + * Topic sequence numbers are **best-effort** and **informational**. + * They are not transactional. + * They exist: + * * to help reconnect to an existing topic while trying to avoid missing items. + * * to facilitate richer monitoring and logging. + * * to provide a best-effort awareness of stream contiguity, or lack thereof, + * in case you need to know. + * You can safely ignore them if none of that matters to you! + * @type \Cache_client\Pubsub\_TopicValue $value + * The value you previously published to this topic. + * @type string $publisher_id + * Authenticated id from Publisher's disposable token + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Cachepubsub::initOnce(); + parent::__construct($data); + } + + /** + * Topic sequence numbers are **best-effort** and **informational**. + * They are not transactional. + * They exist: + * * to help reconnect to an existing topic while trying to avoid missing items. + * * to facilitate richer monitoring and logging. + * * to provide a best-effort awareness of stream contiguity, or lack thereof, + * in case you need to know. + * You can safely ignore them if none of that matters to you! + * + * Generated from protobuf field uint64 topic_sequence_number = 1; + * @return int|string + */ + public function getTopicSequenceNumber() + { + return $this->topic_sequence_number; + } + + /** + * Topic sequence numbers are **best-effort** and **informational**. + * They are not transactional. + * They exist: + * * to help reconnect to an existing topic while trying to avoid missing items. + * * to facilitate richer monitoring and logging. + * * to provide a best-effort awareness of stream contiguity, or lack thereof, + * in case you need to know. + * You can safely ignore them if none of that matters to you! + * + * Generated from protobuf field uint64 topic_sequence_number = 1; + * @param int|string $var + * @return $this + */ + public function setTopicSequenceNumber($var) + { + GPBUtil::checkUint64($var); + $this->topic_sequence_number = $var; + + return $this; + } + + /** + * The value you previously published to this topic. + * + * Generated from protobuf field .cache_client.pubsub._TopicValue value = 2; + * @return \Cache_client\Pubsub\_TopicValue|null + */ + public function getValue() + { + return $this->value; + } + + public function hasValue() + { + return isset($this->value); + } + + public function clearValue() + { + unset($this->value); + } + + /** + * The value you previously published to this topic. + * + * Generated from protobuf field .cache_client.pubsub._TopicValue value = 2; + * @param \Cache_client\Pubsub\_TopicValue $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkMessage($var, \Cache_client\Pubsub\_TopicValue::class); + $this->value = $var; + + return $this; + } + + /** + * Authenticated id from Publisher's disposable token + * + * Generated from protobuf field string publisher_id = 3; + * @return string + */ + public function getPublisherId() + { + return $this->publisher_id; + } + + /** + * Authenticated id from Publisher's disposable token + * + * Generated from protobuf field string publisher_id = 3; + * @param string $var + * @return $this + */ + public function setPublisherId($var) + { + GPBUtil::checkString($var, True); + $this->publisher_id = $var; + + return $this; + } + +} + diff --git a/types/Cache_client/Pubsub/_TopicValue.php b/types/Cache_client/Pubsub/_TopicValue.php new file mode 100644 index 00000000..8f519b0d --- /dev/null +++ b/types/Cache_client/Pubsub/_TopicValue.php @@ -0,0 +1,98 @@ +cache_client.pubsub._TopicValue + */ +class _TopicValue extends \Google\Protobuf\Internal\Message +{ + protected $kind; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $text + * @type string $binary + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Cachepubsub::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string text = 1; + * @return string + */ + public function getText() + { + return $this->readOneof(1); + } + + public function hasText() + { + return $this->hasOneof(1); + } + + /** + * Generated from protobuf field string text = 1; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Generated from protobuf field bytes binary = 2; + * @return string + */ + public function getBinary() + { + return $this->readOneof(2); + } + + public function hasBinary() + { + return $this->hasOneof(2); + } + + /** + * Generated from protobuf field bytes binary = 2; + * @param string $var + * @return $this + */ + public function setBinary($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getKind() + { + return $this->whichOneof("kind"); + } + +} + diff --git a/types/Cache_client/ScsClient.php b/types/Cache_client/ScsClient.php index 743dafb1..bf8ecedb 100644 --- a/types/Cache_client/ScsClient.php +++ b/types/Cache_client/ScsClient.php @@ -30,6 +30,20 @@ public function Get(\Cache_client\_GetRequest $argument, $metadata, $options); } + /** + * @param \Cache_client\_GetBatchRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\ServerStreamingCall + */ + public function GetBatch(\Cache_client\_GetBatchRequest $argument, + $metadata = [], $options = []) { + return $this->_serverStreamRequest('/cache_client.Scs/GetBatch', + $argument, + ['\Cache_client\_GetResponse', 'decode'], + $metadata, $options); + } + /** * @param \Cache_client\_SetRequest $argument input argument * @param array $metadata metadata @@ -44,6 +58,20 @@ public function Set(\Cache_client\_SetRequest $argument, $metadata, $options); } + /** + * @param \Cache_client\_SetBatchRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\ServerStreamingCall + */ + public function SetBatch(\Cache_client\_SetBatchRequest $argument, + $metadata = [], $options = []) { + return $this->_serverStreamRequest('/cache_client.Scs/SetBatch', + $argument, + ['\Cache_client\_SetResponse', 'decode'], + $metadata, $options); + } + /** * @param \Cache_client\_SetIfNotExistsRequest $argument input argument * @param array $metadata metadata @@ -240,6 +268,20 @@ public function SetFetch(\Cache_client\_SetFetchRequest $argument, $metadata, $options); } + /** + * @param \Cache_client\_SetSampleRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function SetSample(\Cache_client\_SetSampleRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/cache_client.Scs/SetSample', + $argument, + ['\Cache_client\_SetSampleResponse', 'decode'], + $metadata, $options); + } + /** * @param \Cache_client\_SetUnionRequest $argument input argument * @param array $metadata metadata @@ -296,6 +338,20 @@ public function SetLength(\Cache_client\_SetLengthRequest $argument, $metadata, $options); } + /** + * @param \Cache_client\_SetPopRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function SetPop(\Cache_client\_SetPopRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/cache_client.Scs/SetPop', + $argument, + ['\Cache_client\_SetPopResponse', 'decode'], + $metadata, $options); + } + /** * @param \Cache_client\_ListPushFrontRequest $argument input argument * @param array $metadata metadata @@ -555,4 +611,34 @@ public function SortedSetGetRank(\Cache_client\_SortedSetGetRankRequest $argumen $metadata, $options); } + /** + * Returns length of the sorted set + * @param \Cache_client\_SortedSetLengthRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function SortedSetLength(\Cache_client\_SortedSetLengthRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/cache_client.Scs/SortedSetLength', + $argument, + ['\Cache_client\_SortedSetLengthResponse', 'decode'], + $metadata, $options); + } + + /** + * Returns number of elements in the sorted set between a given min and max score + * @param \Cache_client\_SortedSetLengthByScoreRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function SortedSetLengthByScore(\Cache_client\_SortedSetLengthByScoreRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/cache_client.Scs/SortedSetLengthByScore', + $argument, + ['\Cache_client\_SortedSetLengthByScoreResponse', 'decode'], + $metadata, $options); + } + } diff --git a/types/Cache_client/_GetBatchRequest.php b/types/Cache_client/_GetBatchRequest.php new file mode 100644 index 00000000..48be388e --- /dev/null +++ b/types/Cache_client/_GetBatchRequest.php @@ -0,0 +1,58 @@ +cache_client._GetBatchRequest + */ +class _GetBatchRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .cache_client._GetRequest items = 1; + */ + private $items; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Cache_client\_GetRequest[]|\Google\Protobuf\Internal\RepeatedField $items + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Cacheclient::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .cache_client._GetRequest items = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * Generated from protobuf field repeated .cache_client._GetRequest items = 1; + * @param \Cache_client\_GetRequest[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Cache_client\_GetRequest::class); + $this->items = $arr; + + return $this; + } + +} + diff --git a/types/Cache_client/_PingRequest.php b/types/Cache_client/_PingRequest.php new file mode 100644 index 00000000..09d07b40 --- /dev/null +++ b/types/Cache_client/_PingRequest.php @@ -0,0 +1,31 @@ +cache_client._PingRequest + */ +class _PingRequest extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Cacheping::initOnce(); + parent::__construct($data); + } + +} + diff --git a/types/Cache_client/_PingResponse.php b/types/Cache_client/_PingResponse.php new file mode 100644 index 00000000..0010a543 --- /dev/null +++ b/types/Cache_client/_PingResponse.php @@ -0,0 +1,31 @@ +cache_client._PingResponse + */ +class _PingResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Cacheping::initOnce(); + parent::__construct($data); + } + +} + diff --git a/types/Cache_client/_SetBatchRequest.php b/types/Cache_client/_SetBatchRequest.php new file mode 100644 index 00000000..7989fd98 --- /dev/null +++ b/types/Cache_client/_SetBatchRequest.php @@ -0,0 +1,58 @@ +cache_client._SetBatchRequest + */ +class _SetBatchRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .cache_client._SetRequest items = 1; + */ + private $items; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Cache_client\_SetRequest[]|\Google\Protobuf\Internal\RepeatedField $items + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Cacheclient::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .cache_client._SetRequest items = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * Generated from protobuf field repeated .cache_client._SetRequest items = 1; + * @param \Cache_client\_SetRequest[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Cache_client\_SetRequest::class); + $this->items = $arr; + + return $this; + } + +} + diff --git a/types/Cache_client/_SetPopRequest.php b/types/Cache_client/_SetPopRequest.php new file mode 100644 index 00000000..0ca74d2d --- /dev/null +++ b/types/Cache_client/_SetPopRequest.php @@ -0,0 +1,85 @@ +cache_client._SetPopRequest + */ +class _SetPopRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field bytes set_name = 1; + */ + protected $set_name = ''; + /** + * Generated from protobuf field uint32 count = 2; + */ + protected $count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $set_name + * @type int $count + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Cacheclient::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field bytes set_name = 1; + * @return string + */ + public function getSetName() + { + return $this->set_name; + } + + /** + * Generated from protobuf field bytes set_name = 1; + * @param string $var + * @return $this + */ + public function setSetName($var) + { + GPBUtil::checkString($var, False); + $this->set_name = $var; + + return $this; + } + + /** + * Generated from protobuf field uint32 count = 2; + * @return int + */ + public function getCount() + { + return $this->count; + } + + /** + * Generated from protobuf field uint32 count = 2; + * @param int $var + * @return $this + */ + public function setCount($var) + { + GPBUtil::checkUint32($var); + $this->count = $var; + + return $this; + } + +} + diff --git a/types/Cache_client/_SetPopResponse.php b/types/Cache_client/_SetPopResponse.php new file mode 100644 index 00000000..4a8cc524 --- /dev/null +++ b/types/Cache_client/_SetPopResponse.php @@ -0,0 +1,96 @@ +cache_client._SetPopResponse + */ +class _SetPopResponse extends \Google\Protobuf\Internal\Message +{ + protected $set; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Cache_client\_SetPopResponse\_Found $found + * @type \Cache_client\_SetPopResponse\_Missing $missing + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Cacheclient::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .cache_client._SetPopResponse._Found found = 1; + * @return \Cache_client\_SetPopResponse\_Found|null + */ + public function getFound() + { + return $this->readOneof(1); + } + + public function hasFound() + { + return $this->hasOneof(1); + } + + /** + * Generated from protobuf field .cache_client._SetPopResponse._Found found = 1; + * @param \Cache_client\_SetPopResponse\_Found $var + * @return $this + */ + public function setFound($var) + { + GPBUtil::checkMessage($var, \Cache_client\_SetPopResponse\_Found::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Generated from protobuf field .cache_client._SetPopResponse._Missing missing = 2; + * @return \Cache_client\_SetPopResponse\_Missing|null + */ + public function getMissing() + { + return $this->readOneof(2); + } + + public function hasMissing() + { + return $this->hasOneof(2); + } + + /** + * Generated from protobuf field .cache_client._SetPopResponse._Missing missing = 2; + * @param \Cache_client\_SetPopResponse\_Missing $var + * @return $this + */ + public function setMissing($var) + { + GPBUtil::checkMessage($var, \Cache_client\_SetPopResponse\_Missing::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getSet() + { + return $this->whichOneof("set"); + } + +} + diff --git a/types/Cache_client/_SetPopResponse/_Found.php b/types/Cache_client/_SetPopResponse/_Found.php new file mode 100644 index 00000000..91a870b3 --- /dev/null +++ b/types/Cache_client/_SetPopResponse/_Found.php @@ -0,0 +1,61 @@ +cache_client._SetPopResponse._Found + */ +class _Found extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated bytes elements = 1; + */ + private $elements; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string[]|\Google\Protobuf\Internal\RepeatedField $elements + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Cacheclient::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated bytes elements = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getElements() + { + return $this->elements; + } + + /** + * Generated from protobuf field repeated bytes elements = 1; + * @param string[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setElements($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::BYTES); + $this->elements = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(_Found::class, \Cache_client\_SetPopResponse__Found::class); + diff --git a/types/Cache_client/_SetPopResponse/_Missing.php b/types/Cache_client/_SetPopResponse/_Missing.php new file mode 100644 index 00000000..4850573f --- /dev/null +++ b/types/Cache_client/_SetPopResponse/_Missing.php @@ -0,0 +1,34 @@ +cache_client._SetPopResponse._Missing + */ +class _Missing extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Cacheclient::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(_Missing::class, \Cache_client\_SetPopResponse__Missing::class); + diff --git a/types/Cache_client/_SetPopResponse__Found.php b/types/Cache_client/_SetPopResponse__Found.php new file mode 100644 index 00000000..5577b165 --- /dev/null +++ b/types/Cache_client/_SetPopResponse__Found.php @@ -0,0 +1,16 @@ +cache_client._SetSampleRequest + */ +class _SetSampleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field bytes set_name = 1; + */ + protected $set_name = ''; + /** + * Generated from protobuf field uint64 limit = 2; + */ + protected $limit = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $set_name + * @type int|string $limit + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Cacheclient::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field bytes set_name = 1; + * @return string + */ + public function getSetName() + { + return $this->set_name; + } + + /** + * Generated from protobuf field bytes set_name = 1; + * @param string $var + * @return $this + */ + public function setSetName($var) + { + GPBUtil::checkString($var, False); + $this->set_name = $var; + + return $this; + } + + /** + * Generated from protobuf field uint64 limit = 2; + * @return int|string + */ + public function getLimit() + { + return $this->limit; + } + + /** + * Generated from protobuf field uint64 limit = 2; + * @param int|string $var + * @return $this + */ + public function setLimit($var) + { + GPBUtil::checkUint64($var); + $this->limit = $var; + + return $this; + } + +} + diff --git a/types/Cache_client/_SetSampleResponse.php b/types/Cache_client/_SetSampleResponse.php new file mode 100644 index 00000000..fef1067f --- /dev/null +++ b/types/Cache_client/_SetSampleResponse.php @@ -0,0 +1,96 @@ +cache_client._SetSampleResponse + */ +class _SetSampleResponse extends \Google\Protobuf\Internal\Message +{ + protected $set; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Cache_client\_SetSampleResponse\_Found $found + * @type \Cache_client\_SetSampleResponse\_Missing $missing + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Cacheclient::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .cache_client._SetSampleResponse._Found found = 1; + * @return \Cache_client\_SetSampleResponse\_Found|null + */ + public function getFound() + { + return $this->readOneof(1); + } + + public function hasFound() + { + return $this->hasOneof(1); + } + + /** + * Generated from protobuf field .cache_client._SetSampleResponse._Found found = 1; + * @param \Cache_client\_SetSampleResponse\_Found $var + * @return $this + */ + public function setFound($var) + { + GPBUtil::checkMessage($var, \Cache_client\_SetSampleResponse\_Found::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Generated from protobuf field .cache_client._SetSampleResponse._Missing missing = 2; + * @return \Cache_client\_SetSampleResponse\_Missing|null + */ + public function getMissing() + { + return $this->readOneof(2); + } + + public function hasMissing() + { + return $this->hasOneof(2); + } + + /** + * Generated from protobuf field .cache_client._SetSampleResponse._Missing missing = 2; + * @param \Cache_client\_SetSampleResponse\_Missing $var + * @return $this + */ + public function setMissing($var) + { + GPBUtil::checkMessage($var, \Cache_client\_SetSampleResponse\_Missing::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getSet() + { + return $this->whichOneof("set"); + } + +} + diff --git a/types/Cache_client/_SetSampleResponse/_Found.php b/types/Cache_client/_SetSampleResponse/_Found.php new file mode 100644 index 00000000..3e6a6dd4 --- /dev/null +++ b/types/Cache_client/_SetSampleResponse/_Found.php @@ -0,0 +1,61 @@ +cache_client._SetSampleResponse._Found + */ +class _Found extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated bytes elements = 1; + */ + private $elements; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string[]|\Google\Protobuf\Internal\RepeatedField $elements + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Cacheclient::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated bytes elements = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getElements() + { + return $this->elements; + } + + /** + * Generated from protobuf field repeated bytes elements = 1; + * @param string[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setElements($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::BYTES); + $this->elements = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(_Found::class, \Cache_client\_SetSampleResponse__Found::class); + diff --git a/types/Cache_client/_SetSampleResponse/_Missing.php b/types/Cache_client/_SetSampleResponse/_Missing.php new file mode 100644 index 00000000..91948aec --- /dev/null +++ b/types/Cache_client/_SetSampleResponse/_Missing.php @@ -0,0 +1,34 @@ +cache_client._SetSampleResponse._Missing + */ +class _Missing extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Cacheclient::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(_Missing::class, \Cache_client\_SetSampleResponse__Missing::class); + diff --git a/types/Cache_client/_SetSampleResponse__Found.php b/types/Cache_client/_SetSampleResponse__Found.php new file mode 100644 index 00000000..851062a2 --- /dev/null +++ b/types/Cache_client/_SetSampleResponse__Found.php @@ -0,0 +1,16 @@ +cache_client._SortedSetLengthByScoreRequest + */ +class _SortedSetLengthByScoreRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field bytes set_name = 1; + */ + protected $set_name = ''; + protected $min; + protected $max; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $set_name + * @type float $inclusive_min + * @type float $exclusive_min + * @type \Cache_client\_Unbounded $unbounded_min + * @type float $inclusive_max + * @type float $exclusive_max + * @type \Cache_client\_Unbounded $unbounded_max + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Cacheclient::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field bytes set_name = 1; + * @return string + */ + public function getSetName() + { + return $this->set_name; + } + + /** + * Generated from protobuf field bytes set_name = 1; + * @param string $var + * @return $this + */ + public function setSetName($var) + { + GPBUtil::checkString($var, False); + $this->set_name = $var; + + return $this; + } + + /** + * Generated from protobuf field double inclusive_min = 2; + * @return float + */ + public function getInclusiveMin() + { + return $this->readOneof(2); + } + + public function hasInclusiveMin() + { + return $this->hasOneof(2); + } + + /** + * Generated from protobuf field double inclusive_min = 2; + * @param float $var + * @return $this + */ + public function setInclusiveMin($var) + { + GPBUtil::checkDouble($var); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Generated from protobuf field double exclusive_min = 3; + * @return float + */ + public function getExclusiveMin() + { + return $this->readOneof(3); + } + + public function hasExclusiveMin() + { + return $this->hasOneof(3); + } + + /** + * Generated from protobuf field double exclusive_min = 3; + * @param float $var + * @return $this + */ + public function setExclusiveMin($var) + { + GPBUtil::checkDouble($var); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Generated from protobuf field .cache_client._Unbounded unbounded_min = 4; + * @return \Cache_client\_Unbounded|null + */ + public function getUnboundedMin() + { + return $this->readOneof(4); + } + + public function hasUnboundedMin() + { + return $this->hasOneof(4); + } + + /** + * Generated from protobuf field .cache_client._Unbounded unbounded_min = 4; + * @param \Cache_client\_Unbounded $var + * @return $this + */ + public function setUnboundedMin($var) + { + GPBUtil::checkMessage($var, \Cache_client\_Unbounded::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Generated from protobuf field double inclusive_max = 5; + * @return float + */ + public function getInclusiveMax() + { + return $this->readOneof(5); + } + + public function hasInclusiveMax() + { + return $this->hasOneof(5); + } + + /** + * Generated from protobuf field double inclusive_max = 5; + * @param float $var + * @return $this + */ + public function setInclusiveMax($var) + { + GPBUtil::checkDouble($var); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Generated from protobuf field double exclusive_max = 6; + * @return float + */ + public function getExclusiveMax() + { + return $this->readOneof(6); + } + + public function hasExclusiveMax() + { + return $this->hasOneof(6); + } + + /** + * Generated from protobuf field double exclusive_max = 6; + * @param float $var + * @return $this + */ + public function setExclusiveMax($var) + { + GPBUtil::checkDouble($var); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Generated from protobuf field .cache_client._Unbounded unbounded_max = 7; + * @return \Cache_client\_Unbounded|null + */ + public function getUnboundedMax() + { + return $this->readOneof(7); + } + + public function hasUnboundedMax() + { + return $this->hasOneof(7); + } + + /** + * Generated from protobuf field .cache_client._Unbounded unbounded_max = 7; + * @param \Cache_client\_Unbounded $var + * @return $this + */ + public function setUnboundedMax($var) + { + GPBUtil::checkMessage($var, \Cache_client\_Unbounded::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * @return string + */ + public function getMin() + { + return $this->whichOneof("min"); + } + + /** + * @return string + */ + public function getMax() + { + return $this->whichOneof("max"); + } + +} + diff --git a/types/Cache_client/_SortedSetLengthByScoreResponse.php b/types/Cache_client/_SortedSetLengthByScoreResponse.php new file mode 100644 index 00000000..c80dc7af --- /dev/null +++ b/types/Cache_client/_SortedSetLengthByScoreResponse.php @@ -0,0 +1,96 @@ +cache_client._SortedSetLengthByScoreResponse + */ +class _SortedSetLengthByScoreResponse extends \Google\Protobuf\Internal\Message +{ + protected $sorted_set; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Cache_client\_SortedSetLengthByScoreResponse\_Found $found + * @type \Cache_client\_SortedSetLengthByScoreResponse\_Missing $missing + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Cacheclient::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .cache_client._SortedSetLengthByScoreResponse._Found found = 1; + * @return \Cache_client\_SortedSetLengthByScoreResponse\_Found|null + */ + public function getFound() + { + return $this->readOneof(1); + } + + public function hasFound() + { + return $this->hasOneof(1); + } + + /** + * Generated from protobuf field .cache_client._SortedSetLengthByScoreResponse._Found found = 1; + * @param \Cache_client\_SortedSetLengthByScoreResponse\_Found $var + * @return $this + */ + public function setFound($var) + { + GPBUtil::checkMessage($var, \Cache_client\_SortedSetLengthByScoreResponse\_Found::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Generated from protobuf field .cache_client._SortedSetLengthByScoreResponse._Missing missing = 2; + * @return \Cache_client\_SortedSetLengthByScoreResponse\_Missing|null + */ + public function getMissing() + { + return $this->readOneof(2); + } + + public function hasMissing() + { + return $this->hasOneof(2); + } + + /** + * Generated from protobuf field .cache_client._SortedSetLengthByScoreResponse._Missing missing = 2; + * @param \Cache_client\_SortedSetLengthByScoreResponse\_Missing $var + * @return $this + */ + public function setMissing($var) + { + GPBUtil::checkMessage($var, \Cache_client\_SortedSetLengthByScoreResponse\_Missing::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getSortedSet() + { + return $this->whichOneof("sorted_set"); + } + +} + diff --git a/types/Cache_client/_SortedSetLengthByScoreResponse/_Found.php b/types/Cache_client/_SortedSetLengthByScoreResponse/_Found.php new file mode 100644 index 00000000..e28b8df0 --- /dev/null +++ b/types/Cache_client/_SortedSetLengthByScoreResponse/_Found.php @@ -0,0 +1,61 @@ +cache_client._SortedSetLengthByScoreResponse._Found + */ +class _Found extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field uint32 length = 1; + */ + protected $length = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $length + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Cacheclient::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field uint32 length = 1; + * @return int + */ + public function getLength() + { + return $this->length; + } + + /** + * Generated from protobuf field uint32 length = 1; + * @param int $var + * @return $this + */ + public function setLength($var) + { + GPBUtil::checkUint32($var); + $this->length = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(_Found::class, \Cache_client\_SortedSetLengthByScoreResponse__Found::class); + diff --git a/types/Cache_client/_SortedSetLengthByScoreResponse/_Missing.php b/types/Cache_client/_SortedSetLengthByScoreResponse/_Missing.php new file mode 100644 index 00000000..40c63e9e --- /dev/null +++ b/types/Cache_client/_SortedSetLengthByScoreResponse/_Missing.php @@ -0,0 +1,34 @@ +cache_client._SortedSetLengthByScoreResponse._Missing + */ +class _Missing extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Cacheclient::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(_Missing::class, \Cache_client\_SortedSetLengthByScoreResponse__Missing::class); + diff --git a/types/Cache_client/_SortedSetLengthByScoreResponse__Found.php b/types/Cache_client/_SortedSetLengthByScoreResponse__Found.php new file mode 100644 index 00000000..6bcd8144 --- /dev/null +++ b/types/Cache_client/_SortedSetLengthByScoreResponse__Found.php @@ -0,0 +1,16 @@ +cache_client._SortedSetLengthRequest + */ +class _SortedSetLengthRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field bytes set_name = 1; + */ + protected $set_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $set_name + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Cacheclient::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field bytes set_name = 1; + * @return string + */ + public function getSetName() + { + return $this->set_name; + } + + /** + * Generated from protobuf field bytes set_name = 1; + * @param string $var + * @return $this + */ + public function setSetName($var) + { + GPBUtil::checkString($var, False); + $this->set_name = $var; + + return $this; + } + +} + diff --git a/types/Cache_client/_SortedSetLengthResponse.php b/types/Cache_client/_SortedSetLengthResponse.php new file mode 100644 index 00000000..b8b7d717 --- /dev/null +++ b/types/Cache_client/_SortedSetLengthResponse.php @@ -0,0 +1,96 @@ +cache_client._SortedSetLengthResponse + */ +class _SortedSetLengthResponse extends \Google\Protobuf\Internal\Message +{ + protected $sorted_set; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Cache_client\_SortedSetLengthResponse\_Found $found + * @type \Cache_client\_SortedSetLengthResponse\_Missing $missing + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Cacheclient::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .cache_client._SortedSetLengthResponse._Found found = 1; + * @return \Cache_client\_SortedSetLengthResponse\_Found|null + */ + public function getFound() + { + return $this->readOneof(1); + } + + public function hasFound() + { + return $this->hasOneof(1); + } + + /** + * Generated from protobuf field .cache_client._SortedSetLengthResponse._Found found = 1; + * @param \Cache_client\_SortedSetLengthResponse\_Found $var + * @return $this + */ + public function setFound($var) + { + GPBUtil::checkMessage($var, \Cache_client\_SortedSetLengthResponse\_Found::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Generated from protobuf field .cache_client._SortedSetLengthResponse._Missing missing = 2; + * @return \Cache_client\_SortedSetLengthResponse\_Missing|null + */ + public function getMissing() + { + return $this->readOneof(2); + } + + public function hasMissing() + { + return $this->hasOneof(2); + } + + /** + * Generated from protobuf field .cache_client._SortedSetLengthResponse._Missing missing = 2; + * @param \Cache_client\_SortedSetLengthResponse\_Missing $var + * @return $this + */ + public function setMissing($var) + { + GPBUtil::checkMessage($var, \Cache_client\_SortedSetLengthResponse\_Missing::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getSortedSet() + { + return $this->whichOneof("sorted_set"); + } + +} + diff --git a/types/Cache_client/_SortedSetLengthResponse/_Found.php b/types/Cache_client/_SortedSetLengthResponse/_Found.php new file mode 100644 index 00000000..f798b7de --- /dev/null +++ b/types/Cache_client/_SortedSetLengthResponse/_Found.php @@ -0,0 +1,61 @@ +cache_client._SortedSetLengthResponse._Found + */ +class _Found extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field uint32 length = 1; + */ + protected $length = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $length + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Cacheclient::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field uint32 length = 1; + * @return int + */ + public function getLength() + { + return $this->length; + } + + /** + * Generated from protobuf field uint32 length = 1; + * @param int $var + * @return $this + */ + public function setLength($var) + { + GPBUtil::checkUint32($var); + $this->length = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(_Found::class, \Cache_client\_SortedSetLengthResponse__Found::class); + diff --git a/types/Cache_client/_SortedSetLengthResponse/_Missing.php b/types/Cache_client/_SortedSetLengthResponse/_Missing.php new file mode 100644 index 00000000..0bb0bb32 --- /dev/null +++ b/types/Cache_client/_SortedSetLengthResponse/_Missing.php @@ -0,0 +1,34 @@ +cache_client._SortedSetLengthResponse._Missing + */ +class _Missing extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Cacheclient::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(_Missing::class, \Cache_client\_SortedSetLengthResponse__Missing::class); + diff --git a/types/Cache_client/_SortedSetLengthResponse__Found.php b/types/Cache_client/_SortedSetLengthResponse__Found.php new file mode 100644 index 00000000..731e4362 --- /dev/null +++ b/types/Cache_client/_SortedSetLengthResponse__Found.php @@ -0,0 +1,16 @@ +_simpleRequest('/control_client.ScsControl/CreateIndex', + $argument, + ['\Control_client\_CreateIndexResponse', 'decode'], + $metadata, $options); + } + + /** + * @param \Control_client\_DeleteIndexRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteIndex(\Control_client\_DeleteIndexRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/control_client.ScsControl/DeleteIndex', + $argument, + ['\Control_client\_DeleteIndexResponse', 'decode'], + $metadata, $options); + } + + /** + * @param \Control_client\_ListIndexesRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListIndexes(\Control_client\_ListIndexesRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/control_client.ScsControl/ListIndexes', + $argument, + ['\Control_client\_ListIndexesResponse', 'decode'], + $metadata, $options); + } + } diff --git a/types/Control_client/_Cache.php b/types/Control_client/_Cache.php index 8a4b77d4..ae0b344d 100644 --- a/types/Control_client/_Cache.php +++ b/types/Control_client/_Cache.php @@ -17,6 +17,14 @@ class _Cache extends \Google\Protobuf\Internal\Message * Generated from protobuf field string cache_name = 1; */ protected $cache_name = ''; + /** + * Generated from protobuf field .control_client._CacheLimits cache_limits = 2; + */ + protected $cache_limits = null; + /** + * Generated from protobuf field .control_client._TopicLimits topic_limits = 3; + */ + protected $topic_limits = null; /** * Constructor. @@ -25,6 +33,8 @@ class _Cache extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $cache_name + * @type \Control_client\_CacheLimits $cache_limits + * @type \Control_client\_TopicLimits $topic_limits * } */ public function __construct($data = NULL) { @@ -54,5 +64,69 @@ public function setCacheName($var) return $this; } + /** + * Generated from protobuf field .control_client._CacheLimits cache_limits = 2; + * @return \Control_client\_CacheLimits|null + */ + public function getCacheLimits() + { + return $this->cache_limits; + } + + public function hasCacheLimits() + { + return isset($this->cache_limits); + } + + public function clearCacheLimits() + { + unset($this->cache_limits); + } + + /** + * Generated from protobuf field .control_client._CacheLimits cache_limits = 2; + * @param \Control_client\_CacheLimits $var + * @return $this + */ + public function setCacheLimits($var) + { + GPBUtil::checkMessage($var, \Control_client\_CacheLimits::class); + $this->cache_limits = $var; + + return $this; + } + + /** + * Generated from protobuf field .control_client._TopicLimits topic_limits = 3; + * @return \Control_client\_TopicLimits|null + */ + public function getTopicLimits() + { + return $this->topic_limits; + } + + public function hasTopicLimits() + { + return isset($this->topic_limits); + } + + public function clearTopicLimits() + { + unset($this->topic_limits); + } + + /** + * Generated from protobuf field .control_client._TopicLimits topic_limits = 3; + * @param \Control_client\_TopicLimits $var + * @return $this + */ + public function setTopicLimits($var) + { + GPBUtil::checkMessage($var, \Control_client\_TopicLimits::class); + $this->topic_limits = $var; + + return $this; + } + } diff --git a/types/Control_client/_CacheLimits.php b/types/Control_client/_CacheLimits.php new file mode 100644 index 00000000..1b4decb7 --- /dev/null +++ b/types/Control_client/_CacheLimits.php @@ -0,0 +1,167 @@ +control_client._CacheLimits + */ +class _CacheLimits extends \Google\Protobuf\Internal\Message +{ + /** + * The amount of transactions per second that can be exercised + * + * Generated from protobuf field uint32 max_traffic_rate = 1; + */ + protected $max_traffic_rate = 0; + /** + * The amount of traffic per second that can be exercised in KiB + * + * Generated from protobuf field uint32 max_throughput_kbps = 2; + */ + protected $max_throughput_kbps = 0; + /** + * The maximum size of a single item in KiB + * + * Generated from protobuf field uint32 max_item_size_kb = 3; + */ + protected $max_item_size_kb = 0; + /** + * The maximum TTL allowed for a single item, in seconds + * + * Generated from protobuf field uint64 max_ttl_seconds = 4; + */ + protected $max_ttl_seconds = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $max_traffic_rate + * The amount of transactions per second that can be exercised + * @type int $max_throughput_kbps + * The amount of traffic per second that can be exercised in KiB + * @type int $max_item_size_kb + * The maximum size of a single item in KiB + * @type int|string $max_ttl_seconds + * The maximum TTL allowed for a single item, in seconds + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Controlclient::initOnce(); + parent::__construct($data); + } + + /** + * The amount of transactions per second that can be exercised + * + * Generated from protobuf field uint32 max_traffic_rate = 1; + * @return int + */ + public function getMaxTrafficRate() + { + return $this->max_traffic_rate; + } + + /** + * The amount of transactions per second that can be exercised + * + * Generated from protobuf field uint32 max_traffic_rate = 1; + * @param int $var + * @return $this + */ + public function setMaxTrafficRate($var) + { + GPBUtil::checkUint32($var); + $this->max_traffic_rate = $var; + + return $this; + } + + /** + * The amount of traffic per second that can be exercised in KiB + * + * Generated from protobuf field uint32 max_throughput_kbps = 2; + * @return int + */ + public function getMaxThroughputKbps() + { + return $this->max_throughput_kbps; + } + + /** + * The amount of traffic per second that can be exercised in KiB + * + * Generated from protobuf field uint32 max_throughput_kbps = 2; + * @param int $var + * @return $this + */ + public function setMaxThroughputKbps($var) + { + GPBUtil::checkUint32($var); + $this->max_throughput_kbps = $var; + + return $this; + } + + /** + * The maximum size of a single item in KiB + * + * Generated from protobuf field uint32 max_item_size_kb = 3; + * @return int + */ + public function getMaxItemSizeKb() + { + return $this->max_item_size_kb; + } + + /** + * The maximum size of a single item in KiB + * + * Generated from protobuf field uint32 max_item_size_kb = 3; + * @param int $var + * @return $this + */ + public function setMaxItemSizeKb($var) + { + GPBUtil::checkUint32($var); + $this->max_item_size_kb = $var; + + return $this; + } + + /** + * The maximum TTL allowed for a single item, in seconds + * + * Generated from protobuf field uint64 max_ttl_seconds = 4; + * @return int|string + */ + public function getMaxTtlSeconds() + { + return $this->max_ttl_seconds; + } + + /** + * The maximum TTL allowed for a single item, in seconds + * + * Generated from protobuf field uint64 max_ttl_seconds = 4; + * @param int|string $var + * @return $this + */ + public function setMaxTtlSeconds($var) + { + GPBUtil::checkUint64($var); + $this->max_ttl_seconds = $var; + + return $this; + } + +} + diff --git a/types/Control_client/_CreateIndexRequest.php b/types/Control_client/_CreateIndexRequest.php new file mode 100644 index 00000000..40f6e099 --- /dev/null +++ b/types/Control_client/_CreateIndexRequest.php @@ -0,0 +1,122 @@ +control_client._CreateIndexRequest + */ +class _CreateIndexRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string index_name = 1; + */ + protected $index_name = ''; + /** + * Generated from protobuf field uint64 num_dimensions = 2; + */ + protected $num_dimensions = 0; + /** + * Generated from protobuf field .control_client._SimilarityMetric similarity_metric = 3; + */ + protected $similarity_metric = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $index_name + * @type int|string $num_dimensions + * @type \Control_client\_SimilarityMetric $similarity_metric + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Controlclient::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string index_name = 1; + * @return string + */ + public function getIndexName() + { + return $this->index_name; + } + + /** + * Generated from protobuf field string index_name = 1; + * @param string $var + * @return $this + */ + public function setIndexName($var) + { + GPBUtil::checkString($var, True); + $this->index_name = $var; + + return $this; + } + + /** + * Generated from protobuf field uint64 num_dimensions = 2; + * @return int|string + */ + public function getNumDimensions() + { + return $this->num_dimensions; + } + + /** + * Generated from protobuf field uint64 num_dimensions = 2; + * @param int|string $var + * @return $this + */ + public function setNumDimensions($var) + { + GPBUtil::checkUint64($var); + $this->num_dimensions = $var; + + return $this; + } + + /** + * Generated from protobuf field .control_client._SimilarityMetric similarity_metric = 3; + * @return \Control_client\_SimilarityMetric|null + */ + public function getSimilarityMetric() + { + return $this->similarity_metric; + } + + public function hasSimilarityMetric() + { + return isset($this->similarity_metric); + } + + public function clearSimilarityMetric() + { + unset($this->similarity_metric); + } + + /** + * Generated from protobuf field .control_client._SimilarityMetric similarity_metric = 3; + * @param \Control_client\_SimilarityMetric $var + * @return $this + */ + public function setSimilarityMetric($var) + { + GPBUtil::checkMessage($var, \Control_client\_SimilarityMetric::class); + $this->similarity_metric = $var; + + return $this; + } + +} + diff --git a/types/Control_client/_CreateIndexResponse.php b/types/Control_client/_CreateIndexResponse.php new file mode 100644 index 00000000..d9ca9235 --- /dev/null +++ b/types/Control_client/_CreateIndexResponse.php @@ -0,0 +1,31 @@ +control_client._CreateIndexResponse + */ +class _CreateIndexResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Controlclient::initOnce(); + parent::__construct($data); + } + +} + diff --git a/types/Control_client/_DeleteIndexRequest.php b/types/Control_client/_DeleteIndexRequest.php new file mode 100644 index 00000000..592ec90d --- /dev/null +++ b/types/Control_client/_DeleteIndexRequest.php @@ -0,0 +1,58 @@ +control_client._DeleteIndexRequest + */ +class _DeleteIndexRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string index_name = 1; + */ + protected $index_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $index_name + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Controlclient::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string index_name = 1; + * @return string + */ + public function getIndexName() + { + return $this->index_name; + } + + /** + * Generated from protobuf field string index_name = 1; + * @param string $var + * @return $this + */ + public function setIndexName($var) + { + GPBUtil::checkString($var, True); + $this->index_name = $var; + + return $this; + } + +} + diff --git a/types/Control_client/_DeleteIndexResponse.php b/types/Control_client/_DeleteIndexResponse.php new file mode 100644 index 00000000..3b943a8a --- /dev/null +++ b/types/Control_client/_DeleteIndexResponse.php @@ -0,0 +1,31 @@ +control_client._DeleteIndexResponse + */ +class _DeleteIndexResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Controlclient::initOnce(); + parent::__construct($data); + } + +} + diff --git a/types/Control_client/_ListIndexesRequest.php b/types/Control_client/_ListIndexesRequest.php new file mode 100644 index 00000000..47ce088d --- /dev/null +++ b/types/Control_client/_ListIndexesRequest.php @@ -0,0 +1,31 @@ +control_client._ListIndexesRequest + */ +class _ListIndexesRequest extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Controlclient::initOnce(); + parent::__construct($data); + } + +} + diff --git a/types/Control_client/_ListIndexesResponse.php b/types/Control_client/_ListIndexesResponse.php new file mode 100644 index 00000000..9111731a --- /dev/null +++ b/types/Control_client/_ListIndexesResponse.php @@ -0,0 +1,58 @@ +control_client._ListIndexesResponse + */ +class _ListIndexesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .control_client._ListIndexesResponse._Index indexes = 1; + */ + private $indexes; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Control_client\_ListIndexesResponse\_Index[]|\Google\Protobuf\Internal\RepeatedField $indexes + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Controlclient::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .control_client._ListIndexesResponse._Index indexes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIndexes() + { + return $this->indexes; + } + + /** + * Generated from protobuf field repeated .control_client._ListIndexesResponse._Index indexes = 1; + * @param \Control_client\_ListIndexesResponse\_Index[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIndexes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Control_client\_ListIndexesResponse\_Index::class); + $this->indexes = $arr; + + return $this; + } + +} + diff --git a/types/Control_client/_ListIndexesResponse/_Index.php b/types/Control_client/_ListIndexesResponse/_Index.php new file mode 100644 index 00000000..1b2deb94 --- /dev/null +++ b/types/Control_client/_ListIndexesResponse/_Index.php @@ -0,0 +1,125 @@ +control_client._ListIndexesResponse._Index + */ +class _Index extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string index_name = 1; + */ + protected $index_name = ''; + /** + * Generated from protobuf field uint64 num_dimensions = 2; + */ + protected $num_dimensions = 0; + /** + * Generated from protobuf field .control_client._SimilarityMetric similarity_metric = 3; + */ + protected $similarity_metric = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $index_name + * @type int|string $num_dimensions + * @type \Control_client\_SimilarityMetric $similarity_metric + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Controlclient::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string index_name = 1; + * @return string + */ + public function getIndexName() + { + return $this->index_name; + } + + /** + * Generated from protobuf field string index_name = 1; + * @param string $var + * @return $this + */ + public function setIndexName($var) + { + GPBUtil::checkString($var, True); + $this->index_name = $var; + + return $this; + } + + /** + * Generated from protobuf field uint64 num_dimensions = 2; + * @return int|string + */ + public function getNumDimensions() + { + return $this->num_dimensions; + } + + /** + * Generated from protobuf field uint64 num_dimensions = 2; + * @param int|string $var + * @return $this + */ + public function setNumDimensions($var) + { + GPBUtil::checkUint64($var); + $this->num_dimensions = $var; + + return $this; + } + + /** + * Generated from protobuf field .control_client._SimilarityMetric similarity_metric = 3; + * @return \Control_client\_SimilarityMetric|null + */ + public function getSimilarityMetric() + { + return $this->similarity_metric; + } + + public function hasSimilarityMetric() + { + return isset($this->similarity_metric); + } + + public function clearSimilarityMetric() + { + unset($this->similarity_metric); + } + + /** + * Generated from protobuf field .control_client._SimilarityMetric similarity_metric = 3; + * @param \Control_client\_SimilarityMetric $var + * @return $this + */ + public function setSimilarityMetric($var) + { + GPBUtil::checkMessage($var, \Control_client\_SimilarityMetric::class); + $this->similarity_metric = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(_Index::class, \Control_client\_ListIndexesResponse__Index::class); + diff --git a/types/Control_client/_ListIndexesResponse__Index.php b/types/Control_client/_ListIndexesResponse__Index.php new file mode 100644 index 00000000..e1f72919 --- /dev/null +++ b/types/Control_client/_ListIndexesResponse__Index.php @@ -0,0 +1,16 @@ +control_client._SimilarityMetric + */ +class _SimilarityMetric extends \Google\Protobuf\Internal\Message +{ + protected $similarity_metric; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Control_client\_SimilarityMetric\_EuclideanSimilarity $euclidean_similarity + * @type \Control_client\_SimilarityMetric\_InnerProduct $inner_product + * @type \Control_client\_SimilarityMetric\_CosineSimilarity $cosine_similarity + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Controlclient::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .control_client._SimilarityMetric._EuclideanSimilarity euclidean_similarity = 1; + * @return \Control_client\_SimilarityMetric\_EuclideanSimilarity|null + */ + public function getEuclideanSimilarity() + { + return $this->readOneof(1); + } + + public function hasEuclideanSimilarity() + { + return $this->hasOneof(1); + } + + /** + * Generated from protobuf field .control_client._SimilarityMetric._EuclideanSimilarity euclidean_similarity = 1; + * @param \Control_client\_SimilarityMetric\_EuclideanSimilarity $var + * @return $this + */ + public function setEuclideanSimilarity($var) + { + GPBUtil::checkMessage($var, \Control_client\_SimilarityMetric\_EuclideanSimilarity::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Generated from protobuf field .control_client._SimilarityMetric._InnerProduct inner_product = 2; + * @return \Control_client\_SimilarityMetric\_InnerProduct|null + */ + public function getInnerProduct() + { + return $this->readOneof(2); + } + + public function hasInnerProduct() + { + return $this->hasOneof(2); + } + + /** + * Generated from protobuf field .control_client._SimilarityMetric._InnerProduct inner_product = 2; + * @param \Control_client\_SimilarityMetric\_InnerProduct $var + * @return $this + */ + public function setInnerProduct($var) + { + GPBUtil::checkMessage($var, \Control_client\_SimilarityMetric\_InnerProduct::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Generated from protobuf field .control_client._SimilarityMetric._CosineSimilarity cosine_similarity = 3; + * @return \Control_client\_SimilarityMetric\_CosineSimilarity|null + */ + public function getCosineSimilarity() + { + return $this->readOneof(3); + } + + public function hasCosineSimilarity() + { + return $this->hasOneof(3); + } + + /** + * Generated from protobuf field .control_client._SimilarityMetric._CosineSimilarity cosine_similarity = 3; + * @param \Control_client\_SimilarityMetric\_CosineSimilarity $var + * @return $this + */ + public function setCosineSimilarity($var) + { + GPBUtil::checkMessage($var, \Control_client\_SimilarityMetric\_CosineSimilarity::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getSimilarityMetric() + { + return $this->whichOneof("similarity_metric"); + } + +} + diff --git a/types/Control_client/_SimilarityMetric/_CosineSimilarity.php b/types/Control_client/_SimilarityMetric/_CosineSimilarity.php new file mode 100644 index 00000000..3349b208 --- /dev/null +++ b/types/Control_client/_SimilarityMetric/_CosineSimilarity.php @@ -0,0 +1,34 @@ +control_client._SimilarityMetric._CosineSimilarity + */ +class _CosineSimilarity extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Controlclient::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(_CosineSimilarity::class, \Control_client\_SimilarityMetric__CosineSimilarity::class); + diff --git a/types/Control_client/_SimilarityMetric/_EuclideanSimilarity.php b/types/Control_client/_SimilarityMetric/_EuclideanSimilarity.php new file mode 100644 index 00000000..234b4c8b --- /dev/null +++ b/types/Control_client/_SimilarityMetric/_EuclideanSimilarity.php @@ -0,0 +1,34 @@ +control_client._SimilarityMetric._EuclideanSimilarity + */ +class _EuclideanSimilarity extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Controlclient::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(_EuclideanSimilarity::class, \Control_client\_SimilarityMetric__EuclideanSimilarity::class); + diff --git a/types/Control_client/_SimilarityMetric/_InnerProduct.php b/types/Control_client/_SimilarityMetric/_InnerProduct.php new file mode 100644 index 00000000..efc466a6 --- /dev/null +++ b/types/Control_client/_SimilarityMetric/_InnerProduct.php @@ -0,0 +1,34 @@ +control_client._SimilarityMetric._InnerProduct + */ +class _InnerProduct extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Controlclient::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(_InnerProduct::class, \Control_client\_SimilarityMetric__InnerProduct::class); + diff --git a/types/Control_client/_SimilarityMetric__CosineSimilarity.php b/types/Control_client/_SimilarityMetric__CosineSimilarity.php new file mode 100644 index 00000000..f4cb6646 --- /dev/null +++ b/types/Control_client/_SimilarityMetric__CosineSimilarity.php @@ -0,0 +1,16 @@ +control_client._TopicLimits + */ +class _TopicLimits extends \Google\Protobuf\Internal\Message +{ + /** + * The amount of messages that can be published per second + * + * Generated from protobuf field uint32 max_publish_rate = 1; + */ + protected $max_publish_rate = 0; + /** + * The maximum amount of active subscriptions per cache + * + * Generated from protobuf field uint32 max_subscription_count = 2; + */ + protected $max_subscription_count = 0; + /** + * The maximum size of a single publish message, in KiB + * + * Generated from protobuf field uint32 max_publish_message_size_kb = 3; + */ + protected $max_publish_message_size_kb = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $max_publish_rate + * The amount of messages that can be published per second + * @type int $max_subscription_count + * The maximum amount of active subscriptions per cache + * @type int $max_publish_message_size_kb + * The maximum size of a single publish message, in KiB + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Controlclient::initOnce(); + parent::__construct($data); + } + + /** + * The amount of messages that can be published per second + * + * Generated from protobuf field uint32 max_publish_rate = 1; + * @return int + */ + public function getMaxPublishRate() + { + return $this->max_publish_rate; + } + + /** + * The amount of messages that can be published per second + * + * Generated from protobuf field uint32 max_publish_rate = 1; + * @param int $var + * @return $this + */ + public function setMaxPublishRate($var) + { + GPBUtil::checkUint32($var); + $this->max_publish_rate = $var; + + return $this; + } + + /** + * The maximum amount of active subscriptions per cache + * + * Generated from protobuf field uint32 max_subscription_count = 2; + * @return int + */ + public function getMaxSubscriptionCount() + { + return $this->max_subscription_count; + } + + /** + * The maximum amount of active subscriptions per cache + * + * Generated from protobuf field uint32 max_subscription_count = 2; + * @param int $var + * @return $this + */ + public function setMaxSubscriptionCount($var) + { + GPBUtil::checkUint32($var); + $this->max_subscription_count = $var; + + return $this; + } + + /** + * The maximum size of a single publish message, in KiB + * + * Generated from protobuf field uint32 max_publish_message_size_kb = 3; + * @return int + */ + public function getMaxPublishMessageSizeKb() + { + return $this->max_publish_message_size_kb; + } + + /** + * The maximum size of a single publish message, in KiB + * + * Generated from protobuf field uint32 max_publish_message_size_kb = 3; + * @param int $var + * @return $this + */ + public function setMaxPublishMessageSizeKb($var) + { + GPBUtil::checkUint32($var); + $this->max_publish_message_size_kb = $var; + + return $this; + } + +} + diff --git a/types/GPBMetadata/Auth.php b/types/GPBMetadata/Auth.php index a825e9c07996ba841c609903203e3555932ce15f..68a38fe26bd09c246dfe3e402d11528ffc1bb182 100644 GIT binary patch delta 180 zcmZn_InB4Bh*2lTJ;2E~wInemu_Q4jAhjqrv$!}jKQA}6xHvIAwb;rkGcU8mKQB2| zL(_V4CZh$@I^|(qXxH;f*wLF9%i5( z!j57g0WOY`{Or`c_{^|(qXxH; z*5rrG^4tLk@yXRJ`f5@u7`c!Ig*>^qic5jI<4cQEizFCkxD|vuLP?S2caj|4)=A}qQaS6LZwIC@Faz=GFqXIL~ z*?J(m9g&oUR2HO4y=CI!M-vl@iQy7VPE5{7jW0lW66^zRBYTi34rn^`oI$FQ1cAN* z8B&s8keQ5P2*h7tL)?(mgPful0#c16=)oZ6#U+4lw2&DWOHqDKDl|kjKGfBmeP?(Fl6Q|;8K`oKITGohe#u?pa!Y#*l zOCkGz3Y2auw9axj1z{DR%+s@Mp;9XocpVAM3Yafz70r|!VH9;nJ|QgjFkX3LyhVni znQ6#{#2ZRbuiMRM@K!^e^8|W9J zz$hFA!|N#?b94~vQ)othAsiZ>J*!stNykd@YS-xSeDH*22)!U9u@@E7Jr2|6?!*O< zlakQOBh>LVYL)bFhjl!}?*MRU z@moKXKh855+)bJo8t6bP>;z|)q%N=ZHKC&L7IsmbCPkbXE@J`8#U-23T3F4w;6_py xYhPHLXSa8?H}EJa$J)z|oskjoKK8ZaMtk(RB*s{+ukXzM^#aO2Ontca`7ha3PkI0V delta 82 zcmV-Y0ImO;g#ovAu&)6EuX2;J0i_8e3JzaHWo%`1lP?Gylez-1v#0}24YTSI)C9Ap o7s(fsXfi(nrW%u}GDed-GeEP)GyVj#7dcn~v$#4^29xJOvnIVDSpWb4 diff --git a/types/GPBMetadata/Cacheping.php b/types/GPBMetadata/Cacheping.php new file mode 100644 index 0000000000000000000000000000000000000000..42c4113346bedaee0af000277b2a3b303bc4dfbf GIT binary patch literal 745 zcmZ`%O;6k~5G@trVDX`HLi93hkyxZ|Kyb@;i=bOpd!QR3PSr}0<4h8(UfbBtfmZv6 z`UiWhoh;F|w7EEAzc=&d&3w4hl_u|Cf)WjNm_zmiu0qg8ImMKKtS$;Pz|=x>fhGbN z&*01K0X~nX4@aJARc#o?z$mLwb6G|Wmk>!8Xf-FQDIQjN=y~N8n72>(v1a zy4uKLqdO#6c7Khs!AHK*ah>N~*;{XQzXJx^3Hh}__WtsCf4jLzncyg0ZbE!EH02X`$lY9?c&W-)@yY^zzM%ahKC_pQHc QpHIWt>Jf#S!$?9S%gx#!$-?_GZu2Qkc%UF0aJ!UplqhzgLzB2tkbg~Usm zO%%kB+A#}JR0!EVB(DyS$j zhup{VB1!Kw*!eipN;XJ+H;P&z)@w$b7FOTq3I(TOeH*1OSgayZ)6i@U|38FE!g{VEMZ&fRIp>a27Ocift>K?bk! zBtfYhM;m6Wa*dtE49S%9&L|A2C}w_f&>ojz=mQNCEZ)+`!YZlsNm6l-OvGD*t7gA^ zFAkIfm~`Lhj@nkwk^o3cXsO?ad;L`#gR)v##}Q-DKRDt{!iXI|8K7`k!_v!_oQmPWMh zZar3iWFV&-RBsvQCEV_`sx#l;fXkgcHQgU&JKuQ^`A#o-=q&a}_G#9s2Y-he!&Wkz z0*WmW`~C2>%)6BqQ-R){debhqqqd&TC^%V8=X6Onj+a`|T6%Kz$!$g724@daT*WRl nS=lmUx|L3LS|cxKSMj5T?rwOP?x&u0cH=6u$aMXj!#Th&ld|+H literal 0 HcmV?d00001 diff --git a/types/GPBMetadata/Controlclient.php b/types/GPBMetadata/Controlclient.php index 5d85207f80c7ea0b7066476f5d957fa1e10a69c0..f16a6c851577f05dcf9fe68ac849d76d5c1ded17 100644 GIT binary patch literal 3495 zcmcgvT~8ZF6peu<%5@CMIt3S^YO_#b+G0{7^?{F8#UunZDONzO6d_I5>#;pzzp^u1 zK`PXj{+g;kB)_4*rgvu6_Sm~lcnU9gcg{Wc-ZN)rXZC)K`!THAM>M2~D`>}VU)iEh z?Kp`<=-Y2wixM1&%Ve9vbz6b%&* z5V`^7vFlO$sCDp)3b*45cNf6(UC!;M83KQTjel|4_L*mM;R^h>#yDXi6U_D5JFITs z?z%pw$dJc&)6f$v3T+v15_+`0VQWr_U5g{^X5T(PilUxR&s(xVZ0`Ix6f_B4|NM}0 zFJZBWk`_XDc6w9{Wsz^{8(CUO$GUc1*SNEjD{|i!NlMM^ww+LsCgHBCTM}Fkf2qng ze_&Z1KXp38w9irU`Vc6?*5ThJs1|5#&1Wx(o&o2-8F)ZWS-^ZZVd4tKPnc)@3J+ViETm?6vx@EM4cMA0)~s!L5gry*y}SSwVkTd%qGFTr2l#TN6A6@z&R9~mYNVe;X|Errf?Tv? z?YPPyj0qax+ImNEOc}0XEy02c6F%V-w}1|>&Eblha{|nK7RAgPS-ZwLU35$|~ zr)|B9qSJ{NrJ>#lD%L8j$nilWeipdflWW|l!}+^}Zcv>{9lVLju(size&;J4vOVTe z&Tghw7$al@B#Y52EFWWZ>9n#Hpm=a*GNXS5pQ-ej%@>RFPRyX(2k$ytP|KF zPEK^ca(7wD$vz4#)LyQ$=YGojYB~q17x>GOJD-WvWo*B{190l`rarA$Z=h@}XKOWA zk1?8MTVDGxC{z2EX zPA4`oLt+N^wU)*V*K>7GLIz1TZh$mXO)df}pK1~^Jyjk#Ox1;j3Bz0G>$zGdAcIW# znsUHlqM=dMm$tx6S~)d3;GbsH3}kW}XNLlAV{|(A7|7(7O{tWW7jPS+)49h$1MY)9 zRC`J6O~~CUy?N4OqMx>LAlM2bJgbSQ|8`5Cr8jx!VzU?R>L-Fvq!;}&^XQevHPl^# nH?j?)sct~++jtTd(bM(e@%>wUD=;n*Q!fw-sqYHca1HQ3t&)dC delta 57 zcmV-90LK5P8>SGjvjGCD43o71CI~4C6JJDSY-N){1t*dO29qlVdjTAikp>*I6$cOk P0<;CQCkeFzlkg0;>ID$x diff --git a/types/GPBMetadata/Extensions.php b/types/GPBMetadata/Extensions.php new file mode 100644 index 0000000000000000000000000000000000000000..3994e649485c5534405f8e56c7d9521e5696a128 GIT binary patch literal 707 zcmZ`%%}yIJ5H3Ab!YXRSt(>MR5}|4~NZd9AR1_LWe+rH}n12CueqL*=LxdM#l+r$R2@K2-X=g!YIhBkaM9t}F9u=R zI#W`BCr)A8mwqX=B*~S03cAKnaOE+yzs44|78IDFX_#q&{X=MHHrRb@f{!sQrpA;C z7xTtiu(i0OsDjS^2XC2@2yrcad!tQs#rtN_J*A%e4Pd!u7}A3a2lySR`17No>sU18CKq21ozQSRhdZY0{3e*~(2?ne zDE#MbN0Dc7hj~;w^gIjen>5Chwhw(KGTEVnE@NXC2Ys2GNNlk0aSS}u9kemD0>|ep z=nK*4TKUQINuFj;CdZj;xWuxQb6g^G=mK?jLQLSDkWhjIe3$T_GkJ_vJ z@=`UYKZlBOWO~PFU*>WX@_{&19w~r)3g8)l0uUf$BzNJKs7t^_+blNRr%;a04~?ngDXh}g-DWD?=7s;yH$?oh zuuDZRNUGu>3uT_Dls*BaDJb(K#ki=Tw7ml4L=5$1p2TGopZRJ*UxuR5nfm-xZ^Ktc z8(rj>()ba+k1*s!bj32Q2^w-bR8A{o4bnZV$?B}=UASj-k*6RI&>Qo~!az;9e+5wJ zGcQD`4NEkE$KBF@g*(POKg571st6YiNd_CRED9i17>Z)&>ZPsQ*}f&v`kxxCN_Kmv zQiux&dJG^nYKV_TqKwLAeN0)s(}0MgQBd7WY44eyxH& z68bM1N>F0BR(9XK=p45954+VHqyo_H%$~KafAdgEjX3GU>fGue-)B>wGf2i}{Ub%I zZA4x{B|FXJK^881`hQqioqUXyJ^dus6u!J{y^+lXLNj1xZ=PccC*l1NaZDvpHP= literal 0 HcmV?d00001 diff --git a/types/GPBMetadata/Permissionmessages.php b/types/GPBMetadata/Permissionmessages.php new file mode 100644 index 0000000000000000000000000000000000000000..abb0871a2e9678e31b3689d5428df5184f47d334 GIT binary patch literal 2282 zcmd5;QBNC35XKnNFvP?hd9bKdZ75Yt6)qK3BE^KHaY=!y#1^5dlpvkX=e51!e0$m5 zlR_*0MSn$qSReD&_s-7w&S&F9R-ft@-;Tfe_M7=;z4z=zJc!|IcElsDe8an}bH&Vn zvsg(Z0~xYT((7@>0y&ID$d$|3VT-+PowHYmC+GJuRm(&Lyuo6whC*v0qaoMY?{n=E z2|(myB=!T&j@r#rZv3uq{C$8R^tEQ~8+q^tF#NhVT2!w-%;lQ z>-nMPNOKe0OQOJ_5M~ovQNZgvEakM=?O0-62khcV%6`Z%+O||I^Wr2jTt$9(amaO` zL~NvLBec=zbCWm7M(R7GZ7rSXv3jbp(YPV90nhiR|VrSh^HZcdHE>GXTz0SRG5z zD6fqC+cWtKyysUj-}-nP?oP#=GguG&V8FdeQY-rLJf!ZAHoL%z^&_W|u?QwO(?-n4 zd2X{OI5(G}{4xwTccDTXzTqJca1@<;cw$JuJx^rT%JD+h!_6OHo!}>i5A&1?lrQ-e zVegY_9rh-~u#lfuMZgrTxpe<(cYFv>NAC}vTl50){e%48dzfCQh1>U&H!mU6OZFPB0saMf CN9hd! literal 0 HcmV?d00001 diff --git a/types/GPBMetadata/Token.php b/types/GPBMetadata/Token.php new file mode 100644 index 0000000000000000000000000000000000000000..79ef1ac57941759a147f5bf7a7a23f274cb3bfaa GIT binary patch literal 1113 zcma)5(M}UV6txIeZbQ`d!P*zENTejP7>qAlk%&dY1JW3t$R^8l_qLs|of&3kjcE8G z|G*FOKb)N{Z4*LpUv_8qo^#JRGxx);8Yy^%2P8-{OBwbr(T)g}mR6=R$9^#wkj7Mw z70*eBh}~oSdVGTW-NTcY4r*kfQ;N{aa}uG)0SGoGqgYCK(AzsA%Q9wJ2O!OvF?dpz z!Y@GgsG^_q6pdxpz1Fx%xZswvod0xcc5uLQLk@Yfc2J1aaw)I`9E+6N8(49cwQEW` z^*b0JNIA?Y?v;j|nfOpx(t_o2mrSa;vQqb4X%r2~PGcx{+8dL$B^@7NyV4j%H$?8B z)dkIWN7Q5sEjnIzNpLm&isvGUd!)zQ7-z!;X4sHS6wUn1;NH&WM?Mk%Da)o>zqoU0 zPua^}>+ok08gmB{EcwOi-x|C~u7O={lr*fLlRuAdbWxD8!7kM4hvJ${vxc>HV>=8h zraOS)euWAG09M#h;!({7$FUr|hlZLuHO>2;7{l3Ka&14HC1Qfd@X)g)JZmnNM6ETb zU-x+qPrkcrk|hJF6GN#KStWU8^%U@Swa&FL6g+}DQ#?7ROYd{JY(^qe(q%kR{S+Ei zheBAMd)15E1uXfzf*hXR5@qoE{~~L}>vtAbYFF>=ox#djj!9TqVS2UGw?l46ML%@I zxi$GWy4Xr{?y5FTcD^~3oobc1RWg*n7g|RX4nGej^j1E5ME`*w-goQMyY!~I*K=cV O>j?PD>bhRR6~I5O&1K{O literal 0 HcmV?d00001 diff --git a/types/GPBMetadata/Vectorindex.php b/types/GPBMetadata/Vectorindex.php new file mode 100644 index 0000000000000000000000000000000000000000..3b1ffec895c19d04314837c9de1b03a5f1c8dd12 GIT binary patch literal 6021 zcmeHLOLx>%9PhkJ=RX}vLthLJ(@jU@0P{PY<+}*1D-Dq{*E&l1YXn!vQ_) z)Rk`h0xmr+{01&u`E~pX{%`J0CihO-!V!)x?51t*|9yY|*PXxHIq1Meb%nUZH$q~m zdoR@RfT$hc3q8|w)V*%2MSRut+8x^=enV9kH`MiwZFOmJZF?G71F!3wWKMlX%+T{~ z*CNjw5jTKqv`Nr0OroxAE<7ZmVHu%u8^CmoAW(OD4Db!8_|xg`Iku?=p%LP*89UHz z*A8vNvA;&k?x-!p2?+A{)3&;<8QPw!QicuJB=uR9$)vP19S=RZqwcPF-o8V2H>q>z z*zTGe65lnP-9-|ZzTH6wHj#90Zl8onNa&aPELTg#*)6rsY@D0xGxCla`dyONuBtu> zyS{rnvYQHcnfw)5_Ws8oC}a% z$|O`NBKC>T52%p^JU|A^!z3a6dlA3q7{eZ-lo&2QDB-~n9xTJSV+Wz`wREN_-~@w_ z+m}SQV>=uA17zB0ZAHcfs{=I^PKw`@lL#qlG;_4PZ~{uv|Ju(vIF)!DqoN7Lz(YJR z_-WZ{IdNkPDbe<8P%s>aU(oc?EcYA-t(<@&<)yYoVdl2gN>D(8g+VAjK?rHz<X8(>E>llr7FHA*a z9>#ic&_hpm$v!rRSBr@DLk>purKepi)+w3)6#C;(X*r$|rjVaM0{J~WK86W>#V2UL zzkOi1hnv)wb@Uc#)=8>qGNS69hJ84n)_^xkoqr38zJ$~I1FT4I$qx%^iTJnY#2S`u zT3+sZZfMx<>tm!B_-Rn|HEYe?B5CyULQk7SS^J}eV3f*WGvn`xf^neI=2a%L_ zL@9j$#?mqj&;yEg8X>&yZJC}=whwS3Iq)1y`z?=Udy5$U(W4iZ-O%gkPomCSRj$A= zj%of2osWZT`pF&#Z^B4C4(hy}GVq-j9f+rfxYwV7k$~EYx66&4qM)PIdL9(l)8$i! zAgNo*4kLGOXk$2$IOHr}s6aU}LHj+ARhq>MGjo~X$jZjvAhtVea{WJi9B!Wh@aV1D zp|D$Eh@uOP5SD+9CF1)WoXNhCH>D!A_b}vU0$sZWBS|LlmE#f=4{ScfSDKR|;2Db0 zNNoo$WP9)k_ugoC`9Ki#Zk8Ykj#Tb1IXI`UkZ8M#)9ctROIUC+l9%QBG0EG@F&437 za!mUv5986k8Jn4SehZ3iJD?*tZ8&w&bGos~91Z;;(qo?AgaQVi?+S7S&*sFSAtPIP zsh?#5hsC3o*&1#xk>=Vw6m=9NpgX-2v+ebeop=FY2+Lh`>$rsDM3{Mf92N^OVPgpN zHs81Pm^IpMD@|!b%5s`6T4S-6|0X#8%;SPXZBIaPO#p?|=+l%57#e9X$gMLaxA-4j9GdTY zT{kK&M>fAETfmt+(!|&&p}|&gzG@G}?C6lnsJj(I1qNzWR6R6I)us0Qg(N7f)6AEKd;D$%e6gREUB(#S51Znbk_ zd5jMeF+Pm5Z&I^Rq`5njC^q_PmJ&%|oT=J?;=x!}4O3=CF443Ov|rV7#J#847!0!Cws_(CeRiPEN!_`ypq*Sjg*aO|G9dog18 z7ycXnoO`dmwg=KLZFin|=9y>a_TIkt2R=NbP2?EZ3SHX!Mb!YQ9|$EJ;n7~$?_)q6 zap5x$gBqocHa%{i(oc=n>4r{~A`Bd?)1TNI2ytGEGXc1Lfzr1fq|MIZS5&rZD|;Wn z@oXvSw*(Bof$EPR_B`fLscfacHkq^-XNuV#yVQyfXy5iE>fA|eKje;Lg3~CW%^j?6 z(}Xj^Zu&xZa6rwb5N95mov10@klEr218#d}1Emu%Ux}cjq4oM1s@#g`q`IA!jp$gP zRuhf&`h>^>s)7)U)hP{7g#q7>bw>nO`L9^ni+3#5@zHhjvPatHY7UIjw%`xI@`%4= zF8yn~2Cz~$TP`8mVA~m>71>{zrqk60@&J}naB_MlIyEj~KFcHK7C;7JZk)Ebw^B=w zY8fu!SHfpbfr;$GqKi^7uBRt>Wk%C4?yXN`YpXMi@dk+13011Qi$6jgBnD(%r4sH> zkQh6#GLk8M!6lMaSeEE$zb&Z(#?O-0jSsMDHPAzaW2J80u~C7C;}l6vV_Qr4!sK`t zB_lBQwT=Q*cJ-qX>mF%&M*CLMasw(>6SFcWahsWCCB?3pw`szo5}H)Ut$8M$j^@2! z>}oSoj|+p=`#A3lsjM*Yl97C#I-G^O=Zw3?5v*BVp`ZC|IHRrIenhWey`1RA<=Fc> z19Pcl(gGOnBUu~n-S9NE{BdEki@|g$rbri-M^=tJ8M2K8GQy|V#&gbNSSqd$DQGC1 zXM}}$g77 literal 0 HcmV?d00001 diff --git a/types/Leaderboard/LeaderboardClient.php b/types/Leaderboard/LeaderboardClient.php new file mode 100644 index 00000000..5d5470ad --- /dev/null +++ b/types/Leaderboard/LeaderboardClient.php @@ -0,0 +1,145 @@ +_simpleRequest('/leaderboard.Leaderboard/DeleteLeaderboard', + $argument, + ['\Leaderboard\_Empty', 'decode'], + $metadata, $options); + } + + /** + * Insert or update elements in a leaderboard. You can do up to 8192 elements per call. + * There is no partial failure: Upsert succeeds or fails. + * @param \Leaderboard\_UpsertElementsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpsertElements(\Leaderboard\_UpsertElementsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/leaderboard.Leaderboard/UpsertElements', + $argument, + ['\Leaderboard\_Empty', 'decode'], + $metadata, $options); + } + + /** + * Remove up to 8192 elements at a time from a leaderboard. Elements are removed by id. + * @param \Leaderboard\_RemoveElementsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function RemoveElements(\Leaderboard\_RemoveElementsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/leaderboard.Leaderboard/RemoveElements', + $argument, + ['\Leaderboard\_Empty', 'decode'], + $metadata, $options); + } + + /** + * Returns the length of a leaderboard in terms of ID count. + * @param \Leaderboard\_GetLeaderboardLengthRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetLeaderboardLength(\Leaderboard\_GetLeaderboardLengthRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/leaderboard.Leaderboard/GetLeaderboardLength', + $argument, + ['\Leaderboard\_GetLeaderboardLengthResponse', 'decode'], + $metadata, $options); + } + + /** + * Get a range of elements. + * * Ordinal, 0-based rank. + * * Range can span up to 8192 elements. + * See RankRange for details about permissible ranges. + * @param \Leaderboard\_GetByRankRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetByRank(\Leaderboard\_GetByRankRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/leaderboard.Leaderboard/GetByRank', + $argument, + ['\Leaderboard\_GetByRankResponse', 'decode'], + $metadata, $options); + } + + /** + * Get the rank of a list of particular ids in the leaderboard. + * * Ordinal, 0-based rank. + * @param \Leaderboard\_GetRankRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetRank(\Leaderboard\_GetRankRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/leaderboard.Leaderboard/GetRank', + $argument, + ['\Leaderboard\_GetRankResponse', 'decode'], + $metadata, $options); + } + + /** + * Get a range of elements by a score range. + * * Ordinal, 0-based rank. + * + * You can request up to 8192 elements at a time. To page through many elements that all + * fall into a score range you can repeatedly invoke this api with the offset parameter. + * @param \Leaderboard\_GetByScoreRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetByScore(\Leaderboard\_GetByScoreRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/leaderboard.Leaderboard/GetByScore', + $argument, + ['\Leaderboard\_GetByScoreResponse', 'decode'], + $metadata, $options); + } + +} diff --git a/types/Leaderboard/_DeleteLeaderboardRequest.php b/types/Leaderboard/_DeleteLeaderboardRequest.php new file mode 100644 index 00000000..ad17ef45 --- /dev/null +++ b/types/Leaderboard/_DeleteLeaderboardRequest.php @@ -0,0 +1,85 @@ +leaderboard._DeleteLeaderboardRequest + */ +class _DeleteLeaderboardRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string cache_name = 1; + */ + protected $cache_name = ''; + /** + * Generated from protobuf field string leaderboard = 2; + */ + protected $leaderboard = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $cache_name + * @type string $leaderboard + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Leaderboard::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string cache_name = 1; + * @return string + */ + public function getCacheName() + { + return $this->cache_name; + } + + /** + * Generated from protobuf field string cache_name = 1; + * @param string $var + * @return $this + */ + public function setCacheName($var) + { + GPBUtil::checkString($var, True); + $this->cache_name = $var; + + return $this; + } + + /** + * Generated from protobuf field string leaderboard = 2; + * @return string + */ + public function getLeaderboard() + { + return $this->leaderboard; + } + + /** + * Generated from protobuf field string leaderboard = 2; + * @param string $var + * @return $this + */ + public function setLeaderboard($var) + { + GPBUtil::checkString($var, True); + $this->leaderboard = $var; + + return $this; + } + +} + diff --git a/types/Leaderboard/_Element.php b/types/Leaderboard/_Element.php new file mode 100644 index 00000000..a01d166c --- /dev/null +++ b/types/Leaderboard/_Element.php @@ -0,0 +1,117 @@ +leaderboard._Element + */ +class _Element extends \Google\Protobuf\Internal\Message +{ + /** + * A player identifier, session identifier, browser identifier or whatever other kind of + * identifier you use for this scoreboard. The full unsigned 64 bit range is allowed here, + * between 0 and 2^63-1 inclusive. + * An id can only appear in a leaderboard one time. You can't have 2 scores for 1 player, + * unless that player has 2 ids! + * + * Generated from protobuf field uint32 id = 1; + */ + protected $id = 0; + /** + * The value by which this element is sorted within the leaderboard. + * + * Generated from protobuf field double score = 3; + */ + protected $score = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $id + * A player identifier, session identifier, browser identifier or whatever other kind of + * identifier you use for this scoreboard. The full unsigned 64 bit range is allowed here, + * between 0 and 2^63-1 inclusive. + * An id can only appear in a leaderboard one time. You can't have 2 scores for 1 player, + * unless that player has 2 ids! + * @type float $score + * The value by which this element is sorted within the leaderboard. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Leaderboard::initOnce(); + parent::__construct($data); + } + + /** + * A player identifier, session identifier, browser identifier or whatever other kind of + * identifier you use for this scoreboard. The full unsigned 64 bit range is allowed here, + * between 0 and 2^63-1 inclusive. + * An id can only appear in a leaderboard one time. You can't have 2 scores for 1 player, + * unless that player has 2 ids! + * + * Generated from protobuf field uint32 id = 1; + * @return int + */ + public function getId() + { + return $this->id; + } + + /** + * A player identifier, session identifier, browser identifier or whatever other kind of + * identifier you use for this scoreboard. The full unsigned 64 bit range is allowed here, + * between 0 and 2^63-1 inclusive. + * An id can only appear in a leaderboard one time. You can't have 2 scores for 1 player, + * unless that player has 2 ids! + * + * Generated from protobuf field uint32 id = 1; + * @param int $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkUint32($var); + $this->id = $var; + + return $this; + } + + /** + * The value by which this element is sorted within the leaderboard. + * + * Generated from protobuf field double score = 3; + * @return float + */ + public function getScore() + { + return $this->score; + } + + /** + * The value by which this element is sorted within the leaderboard. + * + * Generated from protobuf field double score = 3; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkDouble($var); + $this->score = $var; + + return $this; + } + +} + diff --git a/types/Leaderboard/_Empty.php b/types/Leaderboard/_Empty.php new file mode 100644 index 00000000..dbbed3cc --- /dev/null +++ b/types/Leaderboard/_Empty.php @@ -0,0 +1,31 @@ +leaderboard._Empty + */ +class _Empty extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Leaderboard::initOnce(); + parent::__construct($data); + } + +} + diff --git a/types/Leaderboard/_GetByRankRequest.php b/types/Leaderboard/_GetByRankRequest.php new file mode 100644 index 00000000..e5ac327a --- /dev/null +++ b/types/Leaderboard/_GetByRankRequest.php @@ -0,0 +1,149 @@ +leaderboard._GetByRankRequest + */ +class _GetByRankRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string cache_name = 1; + */ + protected $cache_name = ''; + /** + * Generated from protobuf field string leaderboard = 2; + */ + protected $leaderboard = ''; + /** + * Generated from protobuf field .leaderboard._RankRange rank_range = 3; + */ + protected $rank_range = null; + /** + * Generated from protobuf field .leaderboard._Order order = 4; + */ + protected $order = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $cache_name + * @type string $leaderboard + * @type \Leaderboard\_RankRange $rank_range + * @type int $order + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Leaderboard::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string cache_name = 1; + * @return string + */ + public function getCacheName() + { + return $this->cache_name; + } + + /** + * Generated from protobuf field string cache_name = 1; + * @param string $var + * @return $this + */ + public function setCacheName($var) + { + GPBUtil::checkString($var, True); + $this->cache_name = $var; + + return $this; + } + + /** + * Generated from protobuf field string leaderboard = 2; + * @return string + */ + public function getLeaderboard() + { + return $this->leaderboard; + } + + /** + * Generated from protobuf field string leaderboard = 2; + * @param string $var + * @return $this + */ + public function setLeaderboard($var) + { + GPBUtil::checkString($var, True); + $this->leaderboard = $var; + + return $this; + } + + /** + * Generated from protobuf field .leaderboard._RankRange rank_range = 3; + * @return \Leaderboard\_RankRange|null + */ + public function getRankRange() + { + return $this->rank_range; + } + + public function hasRankRange() + { + return isset($this->rank_range); + } + + public function clearRankRange() + { + unset($this->rank_range); + } + + /** + * Generated from protobuf field .leaderboard._RankRange rank_range = 3; + * @param \Leaderboard\_RankRange $var + * @return $this + */ + public function setRankRange($var) + { + GPBUtil::checkMessage($var, \Leaderboard\_RankRange::class); + $this->rank_range = $var; + + return $this; + } + + /** + * Generated from protobuf field .leaderboard._Order order = 4; + * @return int + */ + public function getOrder() + { + return $this->order; + } + + /** + * Generated from protobuf field .leaderboard._Order order = 4; + * @param int $var + * @return $this + */ + public function setOrder($var) + { + GPBUtil::checkEnum($var, \Leaderboard\_Order::class); + $this->order = $var; + + return $this; + } + +} + diff --git a/types/Leaderboard/_GetByRankResponse.php b/types/Leaderboard/_GetByRankResponse.php new file mode 100644 index 00000000..f57e3968 --- /dev/null +++ b/types/Leaderboard/_GetByRankResponse.php @@ -0,0 +1,58 @@ +leaderboard._GetByRankResponse + */ +class _GetByRankResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .leaderboard._RankedElement elements = 1; + */ + private $elements; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Leaderboard\_RankedElement[]|\Google\Protobuf\Internal\RepeatedField $elements + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Leaderboard::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .leaderboard._RankedElement elements = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getElements() + { + return $this->elements; + } + + /** + * Generated from protobuf field repeated .leaderboard._RankedElement elements = 1; + * @param \Leaderboard\_RankedElement[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setElements($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Leaderboard\_RankedElement::class); + $this->elements = $arr; + + return $this; + } + +} + diff --git a/types/Leaderboard/_GetByScoreRequest.php b/types/Leaderboard/_GetByScoreRequest.php new file mode 100644 index 00000000..db4e7caa --- /dev/null +++ b/types/Leaderboard/_GetByScoreRequest.php @@ -0,0 +1,217 @@ +leaderboard._GetByScoreRequest + */ +class _GetByScoreRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string cache_name = 1; + */ + protected $cache_name = ''; + /** + * Generated from protobuf field string leaderboard = 2; + */ + protected $leaderboard = ''; + /** + * Generated from protobuf field .leaderboard._ScoreRange score_range = 3; + */ + protected $score_range = null; + /** + * Where should we start returning scores from in the elements within this range? + * + * Generated from protobuf field uint32 offset = 4; + */ + protected $offset = 0; + /** + * How many elements should we limit to returning? (8192 max) + * + * Generated from protobuf field uint32 limit_elements = 5; + */ + protected $limit_elements = 0; + /** + * Generated from protobuf field .leaderboard._Order order = 6; + */ + protected $order = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $cache_name + * @type string $leaderboard + * @type \Leaderboard\_ScoreRange $score_range + * @type int $offset + * Where should we start returning scores from in the elements within this range? + * @type int $limit_elements + * How many elements should we limit to returning? (8192 max) + * @type int $order + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Leaderboard::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string cache_name = 1; + * @return string + */ + public function getCacheName() + { + return $this->cache_name; + } + + /** + * Generated from protobuf field string cache_name = 1; + * @param string $var + * @return $this + */ + public function setCacheName($var) + { + GPBUtil::checkString($var, True); + $this->cache_name = $var; + + return $this; + } + + /** + * Generated from protobuf field string leaderboard = 2; + * @return string + */ + public function getLeaderboard() + { + return $this->leaderboard; + } + + /** + * Generated from protobuf field string leaderboard = 2; + * @param string $var + * @return $this + */ + public function setLeaderboard($var) + { + GPBUtil::checkString($var, True); + $this->leaderboard = $var; + + return $this; + } + + /** + * Generated from protobuf field .leaderboard._ScoreRange score_range = 3; + * @return \Leaderboard\_ScoreRange|null + */ + public function getScoreRange() + { + return $this->score_range; + } + + public function hasScoreRange() + { + return isset($this->score_range); + } + + public function clearScoreRange() + { + unset($this->score_range); + } + + /** + * Generated from protobuf field .leaderboard._ScoreRange score_range = 3; + * @param \Leaderboard\_ScoreRange $var + * @return $this + */ + public function setScoreRange($var) + { + GPBUtil::checkMessage($var, \Leaderboard\_ScoreRange::class); + $this->score_range = $var; + + return $this; + } + + /** + * Where should we start returning scores from in the elements within this range? + * + * Generated from protobuf field uint32 offset = 4; + * @return int + */ + public function getOffset() + { + return $this->offset; + } + + /** + * Where should we start returning scores from in the elements within this range? + * + * Generated from protobuf field uint32 offset = 4; + * @param int $var + * @return $this + */ + public function setOffset($var) + { + GPBUtil::checkUint32($var); + $this->offset = $var; + + return $this; + } + + /** + * How many elements should we limit to returning? (8192 max) + * + * Generated from protobuf field uint32 limit_elements = 5; + * @return int + */ + public function getLimitElements() + { + return $this->limit_elements; + } + + /** + * How many elements should we limit to returning? (8192 max) + * + * Generated from protobuf field uint32 limit_elements = 5; + * @param int $var + * @return $this + */ + public function setLimitElements($var) + { + GPBUtil::checkUint32($var); + $this->limit_elements = $var; + + return $this; + } + + /** + * Generated from protobuf field .leaderboard._Order order = 6; + * @return int + */ + public function getOrder() + { + return $this->order; + } + + /** + * Generated from protobuf field .leaderboard._Order order = 6; + * @param int $var + * @return $this + */ + public function setOrder($var) + { + GPBUtil::checkEnum($var, \Leaderboard\_Order::class); + $this->order = $var; + + return $this; + } + +} + diff --git a/types/Leaderboard/_GetByScoreResponse.php b/types/Leaderboard/_GetByScoreResponse.php new file mode 100644 index 00000000..6b2b20d2 --- /dev/null +++ b/types/Leaderboard/_GetByScoreResponse.php @@ -0,0 +1,58 @@ +leaderboard._GetByScoreResponse + */ +class _GetByScoreResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .leaderboard._RankedElement elements = 1; + */ + private $elements; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Leaderboard\_RankedElement[]|\Google\Protobuf\Internal\RepeatedField $elements + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Leaderboard::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .leaderboard._RankedElement elements = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getElements() + { + return $this->elements; + } + + /** + * Generated from protobuf field repeated .leaderboard._RankedElement elements = 1; + * @param \Leaderboard\_RankedElement[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setElements($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Leaderboard\_RankedElement::class); + $this->elements = $arr; + + return $this; + } + +} + diff --git a/types/Leaderboard/_GetLeaderboardLengthRequest.php b/types/Leaderboard/_GetLeaderboardLengthRequest.php new file mode 100644 index 00000000..27f96960 --- /dev/null +++ b/types/Leaderboard/_GetLeaderboardLengthRequest.php @@ -0,0 +1,85 @@ +leaderboard._GetLeaderboardLengthRequest + */ +class _GetLeaderboardLengthRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string cache_name = 1; + */ + protected $cache_name = ''; + /** + * Generated from protobuf field string leaderboard = 2; + */ + protected $leaderboard = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $cache_name + * @type string $leaderboard + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Leaderboard::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string cache_name = 1; + * @return string + */ + public function getCacheName() + { + return $this->cache_name; + } + + /** + * Generated from protobuf field string cache_name = 1; + * @param string $var + * @return $this + */ + public function setCacheName($var) + { + GPBUtil::checkString($var, True); + $this->cache_name = $var; + + return $this; + } + + /** + * Generated from protobuf field string leaderboard = 2; + * @return string + */ + public function getLeaderboard() + { + return $this->leaderboard; + } + + /** + * Generated from protobuf field string leaderboard = 2; + * @param string $var + * @return $this + */ + public function setLeaderboard($var) + { + GPBUtil::checkString($var, True); + $this->leaderboard = $var; + + return $this; + } + +} + diff --git a/types/Leaderboard/_GetLeaderboardLengthResponse.php b/types/Leaderboard/_GetLeaderboardLengthResponse.php new file mode 100644 index 00000000..e88d1e7c --- /dev/null +++ b/types/Leaderboard/_GetLeaderboardLengthResponse.php @@ -0,0 +1,58 @@ +leaderboard._GetLeaderboardLengthResponse + */ +class _GetLeaderboardLengthResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field uint32 count = 1; + */ + protected $count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $count + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Leaderboard::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field uint32 count = 1; + * @return int + */ + public function getCount() + { + return $this->count; + } + + /** + * Generated from protobuf field uint32 count = 1; + * @param int $var + * @return $this + */ + public function setCount($var) + { + GPBUtil::checkUint32($var); + $this->count = $var; + + return $this; + } + +} + diff --git a/types/Leaderboard/_GetRankRequest.php b/types/Leaderboard/_GetRankRequest.php new file mode 100644 index 00000000..45dab927 --- /dev/null +++ b/types/Leaderboard/_GetRankRequest.php @@ -0,0 +1,139 @@ +leaderboard._GetRankRequest + */ +class _GetRankRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string cache_name = 1; + */ + protected $cache_name = ''; + /** + * Generated from protobuf field string leaderboard = 2; + */ + protected $leaderboard = ''; + /** + * Generated from protobuf field repeated uint32 ids = 3; + */ + private $ids; + /** + * Generated from protobuf field .leaderboard._Order order = 4; + */ + protected $order = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $cache_name + * @type string $leaderboard + * @type int[]|\Google\Protobuf\Internal\RepeatedField $ids + * @type int $order + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Leaderboard::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string cache_name = 1; + * @return string + */ + public function getCacheName() + { + return $this->cache_name; + } + + /** + * Generated from protobuf field string cache_name = 1; + * @param string $var + * @return $this + */ + public function setCacheName($var) + { + GPBUtil::checkString($var, True); + $this->cache_name = $var; + + return $this; + } + + /** + * Generated from protobuf field string leaderboard = 2; + * @return string + */ + public function getLeaderboard() + { + return $this->leaderboard; + } + + /** + * Generated from protobuf field string leaderboard = 2; + * @param string $var + * @return $this + */ + public function setLeaderboard($var) + { + GPBUtil::checkString($var, True); + $this->leaderboard = $var; + + return $this; + } + + /** + * Generated from protobuf field repeated uint32 ids = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIds() + { + return $this->ids; + } + + /** + * Generated from protobuf field repeated uint32 ids = 3; + * @param int[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::UINT32); + $this->ids = $arr; + + return $this; + } + + /** + * Generated from protobuf field .leaderboard._Order order = 4; + * @return int + */ + public function getOrder() + { + return $this->order; + } + + /** + * Generated from protobuf field .leaderboard._Order order = 4; + * @param int $var + * @return $this + */ + public function setOrder($var) + { + GPBUtil::checkEnum($var, \Leaderboard\_Order::class); + $this->order = $var; + + return $this; + } + +} + diff --git a/types/Leaderboard/_GetRankResponse.php b/types/Leaderboard/_GetRankResponse.php new file mode 100644 index 00000000..8437d4da --- /dev/null +++ b/types/Leaderboard/_GetRankResponse.php @@ -0,0 +1,58 @@ +leaderboard._GetRankResponse + */ +class _GetRankResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .leaderboard._RankedElement elements = 1; + */ + private $elements; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Leaderboard\_RankedElement[]|\Google\Protobuf\Internal\RepeatedField $elements + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Leaderboard::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .leaderboard._RankedElement elements = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getElements() + { + return $this->elements; + } + + /** + * Generated from protobuf field repeated .leaderboard._RankedElement elements = 1; + * @param \Leaderboard\_RankedElement[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setElements($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Leaderboard\_RankedElement::class); + $this->elements = $arr; + + return $this; + } + +} + diff --git a/types/Leaderboard/_Order.php b/types/Leaderboard/_Order.php new file mode 100644 index 00000000..1f75ad88 --- /dev/null +++ b/types/Leaderboard/_Order.php @@ -0,0 +1,52 @@ +leaderboard._Order + */ +class _Order +{ + /** + * Ascending order (0 is the lowest-scoring rank) + * + * Generated from protobuf enum ASCENDING = 0; + */ + const ASCENDING = 0; + /** + * Descending order (0 is the highest-scoring rank) + * + * Generated from protobuf enum DESCENDING = 1; + */ + const DESCENDING = 1; + + private static $valueToName = [ + self::ASCENDING => 'ASCENDING', + self::DESCENDING => 'DESCENDING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/types/Leaderboard/_RankRange.php b/types/Leaderboard/_RankRange.php new file mode 100644 index 00000000..f2ed944e --- /dev/null +++ b/types/Leaderboard/_RankRange.php @@ -0,0 +1,100 @@ +leaderboard._RankRange + */ +class _RankRange extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field uint32 start_inclusive = 1; + */ + protected $start_inclusive = 0; + /** + * Generated from protobuf field uint32 end_exclusive = 2; + */ + protected $end_exclusive = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $start_inclusive + * @type int $end_exclusive + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Leaderboard::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field uint32 start_inclusive = 1; + * @return int + */ + public function getStartInclusive() + { + return $this->start_inclusive; + } + + /** + * Generated from protobuf field uint32 start_inclusive = 1; + * @param int $var + * @return $this + */ + public function setStartInclusive($var) + { + GPBUtil::checkUint32($var); + $this->start_inclusive = $var; + + return $this; + } + + /** + * Generated from protobuf field uint32 end_exclusive = 2; + * @return int + */ + public function getEndExclusive() + { + return $this->end_exclusive; + } + + /** + * Generated from protobuf field uint32 end_exclusive = 2; + * @param int $var + * @return $this + */ + public function setEndExclusive($var) + { + GPBUtil::checkUint32($var); + $this->end_exclusive = $var; + + return $this; + } + +} + diff --git a/types/Leaderboard/_RankedElement.php b/types/Leaderboard/_RankedElement.php new file mode 100644 index 00000000..24bc1a6b --- /dev/null +++ b/types/Leaderboard/_RankedElement.php @@ -0,0 +1,115 @@ +leaderboard._RankedElement + */ +class _RankedElement extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field uint32 id = 1; + */ + protected $id = 0; + /** + * Generated from protobuf field uint32 rank = 3; + */ + protected $rank = 0; + /** + * Generated from protobuf field double score = 4; + */ + protected $score = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $id + * @type int $rank + * @type float $score + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Leaderboard::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field uint32 id = 1; + * @return int + */ + public function getId() + { + return $this->id; + } + + /** + * Generated from protobuf field uint32 id = 1; + * @param int $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkUint32($var); + $this->id = $var; + + return $this; + } + + /** + * Generated from protobuf field uint32 rank = 3; + * @return int + */ + public function getRank() + { + return $this->rank; + } + + /** + * Generated from protobuf field uint32 rank = 3; + * @param int $var + * @return $this + */ + public function setRank($var) + { + GPBUtil::checkUint32($var); + $this->rank = $var; + + return $this; + } + + /** + * Generated from protobuf field double score = 4; + * @return float + */ + public function getScore() + { + return $this->score; + } + + /** + * Generated from protobuf field double score = 4; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkDouble($var); + $this->score = $var; + + return $this; + } + +} + diff --git a/types/Leaderboard/_RemoveElementsRequest.php b/types/Leaderboard/_RemoveElementsRequest.php new file mode 100644 index 00000000..18ea36bf --- /dev/null +++ b/types/Leaderboard/_RemoveElementsRequest.php @@ -0,0 +1,119 @@ +leaderboard._RemoveElementsRequest + */ +class _RemoveElementsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string cache_name = 1; + */ + protected $cache_name = ''; + /** + * Generated from protobuf field string leaderboard = 2; + */ + protected $leaderboard = ''; + /** + * You can have up to 8192 ids in this list. + * + * Generated from protobuf field repeated uint32 ids = 3; + */ + private $ids; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $cache_name + * @type string $leaderboard + * @type int[]|\Google\Protobuf\Internal\RepeatedField $ids + * You can have up to 8192 ids in this list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Leaderboard::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string cache_name = 1; + * @return string + */ + public function getCacheName() + { + return $this->cache_name; + } + + /** + * Generated from protobuf field string cache_name = 1; + * @param string $var + * @return $this + */ + public function setCacheName($var) + { + GPBUtil::checkString($var, True); + $this->cache_name = $var; + + return $this; + } + + /** + * Generated from protobuf field string leaderboard = 2; + * @return string + */ + public function getLeaderboard() + { + return $this->leaderboard; + } + + /** + * Generated from protobuf field string leaderboard = 2; + * @param string $var + * @return $this + */ + public function setLeaderboard($var) + { + GPBUtil::checkString($var, True); + $this->leaderboard = $var; + + return $this; + } + + /** + * You can have up to 8192 ids in this list. + * + * Generated from protobuf field repeated uint32 ids = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIds() + { + return $this->ids; + } + + /** + * You can have up to 8192 ids in this list. + * + * Generated from protobuf field repeated uint32 ids = 3; + * @param int[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::UINT32); + $this->ids = $arr; + + return $this; + } + +} + diff --git a/types/Leaderboard/_ScoreRange.php b/types/Leaderboard/_ScoreRange.php new file mode 100644 index 00000000..f0272ebf --- /dev/null +++ b/types/Leaderboard/_ScoreRange.php @@ -0,0 +1,182 @@ +leaderboard._ScoreRange + */ +class _ScoreRange extends \Google\Protobuf\Internal\Message +{ + protected $min; + protected $max; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Leaderboard\_Unbounded $unbounded_min + * @type float $min_inclusive + * IEEE 754 single precision 64 bit floating point number. + * Momento does not support NaN or Inf in leaderboards. + * @type \Leaderboard\_Unbounded $unbounded_max + * @type float $max_exclusive + * IEEE 754 single precision 64 bit floating point number. + * Momento does not support NaN or Inf in leaderboards. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Leaderboard::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .leaderboard._Unbounded unbounded_min = 1; + * @return \Leaderboard\_Unbounded|null + */ + public function getUnboundedMin() + { + return $this->readOneof(1); + } + + public function hasUnboundedMin() + { + return $this->hasOneof(1); + } + + /** + * Generated from protobuf field .leaderboard._Unbounded unbounded_min = 1; + * @param \Leaderboard\_Unbounded $var + * @return $this + */ + public function setUnboundedMin($var) + { + GPBUtil::checkMessage($var, \Leaderboard\_Unbounded::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * IEEE 754 single precision 64 bit floating point number. + * Momento does not support NaN or Inf in leaderboards. + * + * Generated from protobuf field double min_inclusive = 5; + * @return float + */ + public function getMinInclusive() + { + return $this->readOneof(5); + } + + public function hasMinInclusive() + { + return $this->hasOneof(5); + } + + /** + * IEEE 754 single precision 64 bit floating point number. + * Momento does not support NaN or Inf in leaderboards. + * + * Generated from protobuf field double min_inclusive = 5; + * @param float $var + * @return $this + */ + public function setMinInclusive($var) + { + GPBUtil::checkDouble($var); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Generated from protobuf field .leaderboard._Unbounded unbounded_max = 3; + * @return \Leaderboard\_Unbounded|null + */ + public function getUnboundedMax() + { + return $this->readOneof(3); + } + + public function hasUnboundedMax() + { + return $this->hasOneof(3); + } + + /** + * Generated from protobuf field .leaderboard._Unbounded unbounded_max = 3; + * @param \Leaderboard\_Unbounded $var + * @return $this + */ + public function setUnboundedMax($var) + { + GPBUtil::checkMessage($var, \Leaderboard\_Unbounded::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * IEEE 754 single precision 64 bit floating point number. + * Momento does not support NaN or Inf in leaderboards. + * + * Generated from protobuf field double max_exclusive = 6; + * @return float + */ + public function getMaxExclusive() + { + return $this->readOneof(6); + } + + public function hasMaxExclusive() + { + return $this->hasOneof(6); + } + + /** + * IEEE 754 single precision 64 bit floating point number. + * Momento does not support NaN or Inf in leaderboards. + * + * Generated from protobuf field double max_exclusive = 6; + * @param float $var + * @return $this + */ + public function setMaxExclusive($var) + { + GPBUtil::checkDouble($var); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * @return string + */ + public function getMin() + { + return $this->whichOneof("min"); + } + + /** + * @return string + */ + public function getMax() + { + return $this->whichOneof("max"); + } + +} + diff --git a/types/Leaderboard/_Unbounded.php b/types/Leaderboard/_Unbounded.php new file mode 100644 index 00000000..221c3f2a --- /dev/null +++ b/types/Leaderboard/_Unbounded.php @@ -0,0 +1,31 @@ +leaderboard._Unbounded + */ +class _Unbounded extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Leaderboard::initOnce(); + parent::__construct($data); + } + +} + diff --git a/types/Leaderboard/_UpsertElementsRequest.php b/types/Leaderboard/_UpsertElementsRequest.php new file mode 100644 index 00000000..c6027c3d --- /dev/null +++ b/types/Leaderboard/_UpsertElementsRequest.php @@ -0,0 +1,119 @@ +leaderboard._UpsertElementsRequest + */ +class _UpsertElementsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string cache_name = 1; + */ + protected $cache_name = ''; + /** + * Generated from protobuf field string leaderboard = 2; + */ + protected $leaderboard = ''; + /** + * You can have up to 8192 elements in this list. + * + * Generated from protobuf field repeated .leaderboard._Element elements = 3; + */ + private $elements; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $cache_name + * @type string $leaderboard + * @type \Leaderboard\_Element[]|\Google\Protobuf\Internal\RepeatedField $elements + * You can have up to 8192 elements in this list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Leaderboard::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string cache_name = 1; + * @return string + */ + public function getCacheName() + { + return $this->cache_name; + } + + /** + * Generated from protobuf field string cache_name = 1; + * @param string $var + * @return $this + */ + public function setCacheName($var) + { + GPBUtil::checkString($var, True); + $this->cache_name = $var; + + return $this; + } + + /** + * Generated from protobuf field string leaderboard = 2; + * @return string + */ + public function getLeaderboard() + { + return $this->leaderboard; + } + + /** + * Generated from protobuf field string leaderboard = 2; + * @param string $var + * @return $this + */ + public function setLeaderboard($var) + { + GPBUtil::checkString($var, True); + $this->leaderboard = $var; + + return $this; + } + + /** + * You can have up to 8192 elements in this list. + * + * Generated from protobuf field repeated .leaderboard._Element elements = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getElements() + { + return $this->elements; + } + + /** + * You can have up to 8192 elements in this list. + * + * Generated from protobuf field repeated .leaderboard._Element elements = 3; + * @param \Leaderboard\_Element[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setElements($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Leaderboard\_Element::class); + $this->elements = $arr; + + return $this; + } + +} + diff --git a/types/Auth/_GenerateApiTokenRequest/CacheRole.php b/types/Permission_messages/CacheRole.php similarity index 63% rename from types/Auth/_GenerateApiTokenRequest/CacheRole.php rename to types/Permission_messages/CacheRole.php index ff4b1afb..878aa6db 100644 --- a/types/Auth/_GenerateApiTokenRequest/CacheRole.php +++ b/types/Permission_messages/CacheRole.php @@ -1,15 +1,15 @@ auth._GenerateApiTokenRequest.CacheRole + * Protobuf type permission_messages.CacheRole */ class CacheRole { @@ -23,10 +23,25 @@ class CacheRole * Generated from protobuf enum CacheReadWrite = 1; */ const CacheReadWrite = 1; + /** + * Restricts access to apis that read from caches: No higher level resource description or modification. + * + * Generated from protobuf enum CacheReadOnly = 2; + */ + const CacheReadOnly = 2; + /** + * Restricts access to apis that write from caches: No higher level resource description or modification. + * Doesn't allow conditional write APIs (SetIfNotExists, IncreaseTTL etc) + * + * Generated from protobuf enum CacheWriteOnly = 3; + */ + const CacheWriteOnly = 3; private static $valueToName = [ self::CachePermitNone => 'CachePermitNone', self::CacheReadWrite => 'CacheReadWrite', + self::CacheReadOnly => 'CacheReadOnly', + self::CacheWriteOnly => 'CacheWriteOnly', ]; public static function name($value) @@ -50,6 +65,3 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CacheRole::class, \Auth\_GenerateApiTokenRequest_CacheRole::class); - diff --git a/types/Permission_messages/ExplicitPermissions.php b/types/Permission_messages/ExplicitPermissions.php new file mode 100644 index 00000000..6103b7c7 --- /dev/null +++ b/types/Permission_messages/ExplicitPermissions.php @@ -0,0 +1,58 @@ +permission_messages.ExplicitPermissions + */ +class ExplicitPermissions extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .permission_messages.PermissionsType permissions = 1; + */ + private $permissions; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Permission_messages\PermissionsType[]|\Google\Protobuf\Internal\RepeatedField $permissions + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Permissionmessages::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .permission_messages.PermissionsType permissions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPermissions() + { + return $this->permissions; + } + + /** + * Generated from protobuf field repeated .permission_messages.PermissionsType permissions = 1; + * @param \Permission_messages\PermissionsType[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPermissions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Permission_messages\PermissionsType::class); + $this->permissions = $arr; + + return $this; + } + +} + diff --git a/types/Auth/_GenerateApiTokenRequest/Permissions.php b/types/Permission_messages/Permissions.php similarity index 53% rename from types/Auth/_GenerateApiTokenRequest/Permissions.php rename to types/Permission_messages/Permissions.php index a958a139..e342e6d3 100644 --- a/types/Auth/_GenerateApiTokenRequest/Permissions.php +++ b/types/Permission_messages/Permissions.php @@ -1,15 +1,15 @@ auth._GenerateApiTokenRequest.Permissions + * Generated from protobuf message permission_messages.Permissions */ class Permissions extends \Google\Protobuf\Internal\Message { @@ -22,16 +22,16 @@ class Permissions extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type int $super_user - * @type \Auth\_GenerateApiTokenRequest\ExplicitPermissions $explicit + * @type \Permission_messages\ExplicitPermissions $explicit * } */ public function __construct($data = NULL) { - \GPBMetadata\Auth::initOnce(); + \GPBMetadata\Permissionmessages::initOnce(); parent::__construct($data); } /** - * Generated from protobuf field .auth._GenerateApiTokenRequest.SuperUserPermissions super_user = 1; + * Generated from protobuf field .permission_messages.SuperUserPermissions super_user = 1; * @return int */ public function getSuperUser() @@ -45,21 +45,21 @@ public function hasSuperUser() } /** - * Generated from protobuf field .auth._GenerateApiTokenRequest.SuperUserPermissions super_user = 1; + * Generated from protobuf field .permission_messages.SuperUserPermissions super_user = 1; * @param int $var * @return $this */ public function setSuperUser($var) { - GPBUtil::checkEnum($var, \Auth\_GenerateApiTokenRequest\SuperUserPermissions::class); + GPBUtil::checkEnum($var, \Permission_messages\SuperUserPermissions::class); $this->writeOneof(1, $var); return $this; } /** - * Generated from protobuf field .auth._GenerateApiTokenRequest.ExplicitPermissions explicit = 2; - * @return \Auth\_GenerateApiTokenRequest\ExplicitPermissions|null + * Generated from protobuf field .permission_messages.ExplicitPermissions explicit = 2; + * @return \Permission_messages\ExplicitPermissions|null */ public function getExplicit() { @@ -72,13 +72,13 @@ public function hasExplicit() } /** - * Generated from protobuf field .auth._GenerateApiTokenRequest.ExplicitPermissions explicit = 2; - * @param \Auth\_GenerateApiTokenRequest\ExplicitPermissions $var + * Generated from protobuf field .permission_messages.ExplicitPermissions explicit = 2; + * @param \Permission_messages\ExplicitPermissions $var * @return $this */ public function setExplicit($var) { - GPBUtil::checkMessage($var, \Auth\_GenerateApiTokenRequest\ExplicitPermissions::class); + GPBUtil::checkMessage($var, \Permission_messages\ExplicitPermissions::class); $this->writeOneof(2, $var); return $this; @@ -94,6 +94,3 @@ public function getKind() } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Permissions::class, \Auth\_GenerateApiTokenRequest_Permissions::class); - diff --git a/types/Permission_messages/PermissionsType.php b/types/Permission_messages/PermissionsType.php new file mode 100644 index 00000000..357f0352 --- /dev/null +++ b/types/Permission_messages/PermissionsType.php @@ -0,0 +1,96 @@ +permission_messages.PermissionsType + */ +class PermissionsType extends \Google\Protobuf\Internal\Message +{ + protected $kind; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Permission_messages\PermissionsType\CachePermissions $cache_permissions + * @type \Permission_messages\PermissionsType\TopicPermissions $topic_permissions + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Permissionmessages::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .permission_messages.PermissionsType.CachePermissions cache_permissions = 1; + * @return \Permission_messages\PermissionsType\CachePermissions|null + */ + public function getCachePermissions() + { + return $this->readOneof(1); + } + + public function hasCachePermissions() + { + return $this->hasOneof(1); + } + + /** + * Generated from protobuf field .permission_messages.PermissionsType.CachePermissions cache_permissions = 1; + * @param \Permission_messages\PermissionsType\CachePermissions $var + * @return $this + */ + public function setCachePermissions($var) + { + GPBUtil::checkMessage($var, \Permission_messages\PermissionsType\CachePermissions::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Generated from protobuf field .permission_messages.PermissionsType.TopicPermissions topic_permissions = 2; + * @return \Permission_messages\PermissionsType\TopicPermissions|null + */ + public function getTopicPermissions() + { + return $this->readOneof(2); + } + + public function hasTopicPermissions() + { + return $this->hasOneof(2); + } + + /** + * Generated from protobuf field .permission_messages.PermissionsType.TopicPermissions topic_permissions = 2; + * @param \Permission_messages\PermissionsType\TopicPermissions $var + * @return $this + */ + public function setTopicPermissions($var) + { + GPBUtil::checkMessage($var, \Permission_messages\PermissionsType\TopicPermissions::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getKind() + { + return $this->whichOneof("kind"); + } + +} + diff --git a/types/Permission_messages/PermissionsType/All.php b/types/Permission_messages/PermissionsType/All.php new file mode 100644 index 00000000..f74d3f9d --- /dev/null +++ b/types/Permission_messages/PermissionsType/All.php @@ -0,0 +1,34 @@ +permission_messages.PermissionsType.All + */ +class All extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Permissionmessages::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(All::class, \Permission_messages\PermissionsType_All::class); + diff --git a/types/Permission_messages/PermissionsType/CacheItemSelector.php b/types/Permission_messages/PermissionsType/CacheItemSelector.php new file mode 100644 index 00000000..7e7448c7 --- /dev/null +++ b/types/Permission_messages/PermissionsType/CacheItemSelector.php @@ -0,0 +1,99 @@ +permission_messages.PermissionsType.CacheItemSelector + */ +class CacheItemSelector extends \Google\Protobuf\Internal\Message +{ + protected $kind; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key + * @type string $key_prefix + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Permissionmessages::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field bytes key = 1; + * @return string + */ + public function getKey() + { + return $this->readOneof(1); + } + + public function hasKey() + { + return $this->hasOneof(1); + } + + /** + * Generated from protobuf field bytes key = 1; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Generated from protobuf field bytes key_prefix = 2; + * @return string + */ + public function getKeyPrefix() + { + return $this->readOneof(2); + } + + public function hasKeyPrefix() + { + return $this->hasOneof(2); + } + + /** + * Generated from protobuf field bytes key_prefix = 2; + * @param string $var + * @return $this + */ + public function setKeyPrefix($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getKind() + { + return $this->whichOneof("kind"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CacheItemSelector::class, \Permission_messages\PermissionsType_CacheItemSelector::class); + diff --git a/types/Permission_messages/PermissionsType/CachePermissions.php b/types/Permission_messages/PermissionsType/CachePermissions.php new file mode 100644 index 00000000..38cb0793 --- /dev/null +++ b/types/Permission_messages/PermissionsType/CachePermissions.php @@ -0,0 +1,191 @@ +permission_messages.PermissionsType.CachePermissions + */ +class CachePermissions extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .permission_messages.CacheRole role = 1; + */ + protected $role = 0; + protected $cache; + protected $cache_item; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $role + * @type \Permission_messages\PermissionsType\All $all_caches + * @type \Permission_messages\PermissionsType\CacheSelector $cache_selector + * @type \Permission_messages\PermissionsType\All $all_items + * @type \Permission_messages\PermissionsType\CacheItemSelector $item_selector + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Permissionmessages::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .permission_messages.CacheRole role = 1; + * @return int + */ + public function getRole() + { + return $this->role; + } + + /** + * Generated from protobuf field .permission_messages.CacheRole role = 1; + * @param int $var + * @return $this + */ + public function setRole($var) + { + GPBUtil::checkEnum($var, \Permission_messages\CacheRole::class); + $this->role = $var; + + return $this; + } + + /** + * Generated from protobuf field .permission_messages.PermissionsType.All all_caches = 2; + * @return \Permission_messages\PermissionsType\All|null + */ + public function getAllCaches() + { + return $this->readOneof(2); + } + + public function hasAllCaches() + { + return $this->hasOneof(2); + } + + /** + * Generated from protobuf field .permission_messages.PermissionsType.All all_caches = 2; + * @param \Permission_messages\PermissionsType\All $var + * @return $this + */ + public function setAllCaches($var) + { + GPBUtil::checkMessage($var, \Permission_messages\PermissionsType\All::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Generated from protobuf field .permission_messages.PermissionsType.CacheSelector cache_selector = 3; + * @return \Permission_messages\PermissionsType\CacheSelector|null + */ + public function getCacheSelector() + { + return $this->readOneof(3); + } + + public function hasCacheSelector() + { + return $this->hasOneof(3); + } + + /** + * Generated from protobuf field .permission_messages.PermissionsType.CacheSelector cache_selector = 3; + * @param \Permission_messages\PermissionsType\CacheSelector $var + * @return $this + */ + public function setCacheSelector($var) + { + GPBUtil::checkMessage($var, \Permission_messages\PermissionsType\CacheSelector::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Generated from protobuf field .permission_messages.PermissionsType.All all_items = 4; + * @return \Permission_messages\PermissionsType\All|null + */ + public function getAllItems() + { + return $this->readOneof(4); + } + + public function hasAllItems() + { + return $this->hasOneof(4); + } + + /** + * Generated from protobuf field .permission_messages.PermissionsType.All all_items = 4; + * @param \Permission_messages\PermissionsType\All $var + * @return $this + */ + public function setAllItems($var) + { + GPBUtil::checkMessage($var, \Permission_messages\PermissionsType\All::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Generated from protobuf field .permission_messages.PermissionsType.CacheItemSelector item_selector = 5; + * @return \Permission_messages\PermissionsType\CacheItemSelector|null + */ + public function getItemSelector() + { + return $this->readOneof(5); + } + + public function hasItemSelector() + { + return $this->hasOneof(5); + } + + /** + * Generated from protobuf field .permission_messages.PermissionsType.CacheItemSelector item_selector = 5; + * @param \Permission_messages\PermissionsType\CacheItemSelector $var + * @return $this + */ + public function setItemSelector($var) + { + GPBUtil::checkMessage($var, \Permission_messages\PermissionsType\CacheItemSelector::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * @return string + */ + public function getCache() + { + return $this->whichOneof("cache"); + } + + /** + * @return string + */ + public function getCacheItem() + { + return $this->whichOneof("cache_item"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CachePermissions::class, \Permission_messages\PermissionsType_CachePermissions::class); + diff --git a/types/Permission_messages/PermissionsType/CacheSelector.php b/types/Permission_messages/PermissionsType/CacheSelector.php new file mode 100644 index 00000000..f8995518 --- /dev/null +++ b/types/Permission_messages/PermissionsType/CacheSelector.php @@ -0,0 +1,71 @@ +permission_messages.PermissionsType.CacheSelector + */ +class CacheSelector extends \Google\Protobuf\Internal\Message +{ + protected $kind; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $cache_name + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Permissionmessages::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string cache_name = 1; + * @return string + */ + public function getCacheName() + { + return $this->readOneof(1); + } + + public function hasCacheName() + { + return $this->hasOneof(1); + } + + /** + * Generated from protobuf field string cache_name = 1; + * @param string $var + * @return $this + */ + public function setCacheName($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getKind() + { + return $this->whichOneof("kind"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CacheSelector::class, \Permission_messages\PermissionsType_CacheSelector::class); + diff --git a/types/Permission_messages/PermissionsType/TopicPermissions.php b/types/Permission_messages/PermissionsType/TopicPermissions.php new file mode 100644 index 00000000..06542f5d --- /dev/null +++ b/types/Permission_messages/PermissionsType/TopicPermissions.php @@ -0,0 +1,191 @@ +permission_messages.PermissionsType.TopicPermissions + */ +class TopicPermissions extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .permission_messages.TopicRole role = 1; + */ + protected $role = 0; + protected $cache; + protected $topic; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $role + * @type \Permission_messages\PermissionsType\All $all_caches + * @type \Permission_messages\PermissionsType\CacheSelector $cache_selector + * @type \Permission_messages\PermissionsType\All $all_topics + * @type \Permission_messages\PermissionsType\TopicSelector $topic_selector + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Permissionmessages::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .permission_messages.TopicRole role = 1; + * @return int + */ + public function getRole() + { + return $this->role; + } + + /** + * Generated from protobuf field .permission_messages.TopicRole role = 1; + * @param int $var + * @return $this + */ + public function setRole($var) + { + GPBUtil::checkEnum($var, \Permission_messages\TopicRole::class); + $this->role = $var; + + return $this; + } + + /** + * Generated from protobuf field .permission_messages.PermissionsType.All all_caches = 2; + * @return \Permission_messages\PermissionsType\All|null + */ + public function getAllCaches() + { + return $this->readOneof(2); + } + + public function hasAllCaches() + { + return $this->hasOneof(2); + } + + /** + * Generated from protobuf field .permission_messages.PermissionsType.All all_caches = 2; + * @param \Permission_messages\PermissionsType\All $var + * @return $this + */ + public function setAllCaches($var) + { + GPBUtil::checkMessage($var, \Permission_messages\PermissionsType\All::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Generated from protobuf field .permission_messages.PermissionsType.CacheSelector cache_selector = 3; + * @return \Permission_messages\PermissionsType\CacheSelector|null + */ + public function getCacheSelector() + { + return $this->readOneof(3); + } + + public function hasCacheSelector() + { + return $this->hasOneof(3); + } + + /** + * Generated from protobuf field .permission_messages.PermissionsType.CacheSelector cache_selector = 3; + * @param \Permission_messages\PermissionsType\CacheSelector $var + * @return $this + */ + public function setCacheSelector($var) + { + GPBUtil::checkMessage($var, \Permission_messages\PermissionsType\CacheSelector::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Generated from protobuf field .permission_messages.PermissionsType.All all_topics = 4; + * @return \Permission_messages\PermissionsType\All|null + */ + public function getAllTopics() + { + return $this->readOneof(4); + } + + public function hasAllTopics() + { + return $this->hasOneof(4); + } + + /** + * Generated from protobuf field .permission_messages.PermissionsType.All all_topics = 4; + * @param \Permission_messages\PermissionsType\All $var + * @return $this + */ + public function setAllTopics($var) + { + GPBUtil::checkMessage($var, \Permission_messages\PermissionsType\All::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Generated from protobuf field .permission_messages.PermissionsType.TopicSelector topic_selector = 5; + * @return \Permission_messages\PermissionsType\TopicSelector|null + */ + public function getTopicSelector() + { + return $this->readOneof(5); + } + + public function hasTopicSelector() + { + return $this->hasOneof(5); + } + + /** + * Generated from protobuf field .permission_messages.PermissionsType.TopicSelector topic_selector = 5; + * @param \Permission_messages\PermissionsType\TopicSelector $var + * @return $this + */ + public function setTopicSelector($var) + { + GPBUtil::checkMessage($var, \Permission_messages\PermissionsType\TopicSelector::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * @return string + */ + public function getCache() + { + return $this->whichOneof("cache"); + } + + /** + * @return string + */ + public function getTopic() + { + return $this->whichOneof("topic"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TopicPermissions::class, \Permission_messages\PermissionsType_TopicPermissions::class); + diff --git a/types/Permission_messages/PermissionsType/TopicSelector.php b/types/Permission_messages/PermissionsType/TopicSelector.php new file mode 100644 index 00000000..c05862b4 --- /dev/null +++ b/types/Permission_messages/PermissionsType/TopicSelector.php @@ -0,0 +1,99 @@ +permission_messages.PermissionsType.TopicSelector + */ +class TopicSelector extends \Google\Protobuf\Internal\Message +{ + protected $kind; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $topic_name + * @type string $topic_name_prefix + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Permissionmessages::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string topic_name = 1; + * @return string + */ + public function getTopicName() + { + return $this->readOneof(1); + } + + public function hasTopicName() + { + return $this->hasOneof(1); + } + + /** + * Generated from protobuf field string topic_name = 1; + * @param string $var + * @return $this + */ + public function setTopicName($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Generated from protobuf field string topic_name_prefix = 2; + * @return string + */ + public function getTopicNamePrefix() + { + return $this->readOneof(2); + } + + public function hasTopicNamePrefix() + { + return $this->hasOneof(2); + } + + /** + * Generated from protobuf field string topic_name_prefix = 2; + * @param string $var + * @return $this + */ + public function setTopicNamePrefix($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getKind() + { + return $this->whichOneof("kind"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TopicSelector::class, \Permission_messages\PermissionsType_TopicSelector::class); + diff --git a/types/Permission_messages/PermissionsType_All.php b/types/Permission_messages/PermissionsType_All.php new file mode 100644 index 00000000..de7ac680 --- /dev/null +++ b/types/Permission_messages/PermissionsType_All.php @@ -0,0 +1,16 @@ +auth._GenerateApiTokenRequest.SuperUserPermissions + * Protobuf type permission_messages.SuperUserPermissions */ class SuperUserPermissions { @@ -41,6 +41,3 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SuperUserPermissions::class, \Auth\_GenerateApiTokenRequest_SuperUserPermissions::class); - diff --git a/types/Auth/_GenerateApiTokenRequest/TopicRole.php b/types/Permission_messages/TopicRole.php similarity index 65% rename from types/Auth/_GenerateApiTokenRequest/TopicRole.php rename to types/Permission_messages/TopicRole.php index c798b8da..e84b66d3 100644 --- a/types/Auth/_GenerateApiTokenRequest/TopicRole.php +++ b/types/Permission_messages/TopicRole.php @@ -1,15 +1,15 @@ auth._GenerateApiTokenRequest.TopicRole + * Protobuf type permission_messages.TopicRole */ class TopicRole { @@ -23,10 +23,24 @@ class TopicRole * Generated from protobuf enum TopicReadWrite = 1; */ const TopicReadWrite = 1; + /** + * Restricts access to apis that read from topics: No higher level resource description or modification. + * + * Generated from protobuf enum TopicReadOnly = 2; + */ + const TopicReadOnly = 2; + /** + * Restricts access to apis that write from topics: No higher level resource description or modification. + * + * Generated from protobuf enum TopicWriteOnly = 3; + */ + const TopicWriteOnly = 3; private static $valueToName = [ self::TopicPermitNone => 'TopicPermitNone', self::TopicReadWrite => 'TopicReadWrite', + self::TopicReadOnly => 'TopicReadOnly', + self::TopicWriteOnly => 'TopicWriteOnly', ]; public static function name($value) @@ -50,6 +64,3 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TopicRole::class, \Auth\_GenerateApiTokenRequest_TopicRole::class); - diff --git a/types/RetrySemantic.php b/types/RetrySemantic.php new file mode 100644 index 00000000..488bc6b3 --- /dev/null +++ b/types/RetrySemantic.php @@ -0,0 +1,50 @@ +RetrySemantic + */ +class RetrySemantic +{ + /** + * Never retry this message without telling the user. (you should infer this as the default) + * + * Generated from protobuf enum NotRetryable = 0; + */ + const NotRetryable = 0; + /** + * You can retry this without surfacing an error to the user. + * + * Generated from protobuf enum Retryable = 1; + */ + const Retryable = 1; + + private static $valueToName = [ + self::NotRetryable => 'NotRetryable', + self::Retryable => 'Retryable', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/types/Token/TokenClient.php b/types/Token/TokenClient.php new file mode 100644 index 00000000..7532abfc --- /dev/null +++ b/types/Token/TokenClient.php @@ -0,0 +1,33 @@ +_simpleRequest('/token.Token/GenerateDisposableToken', + $argument, + ['\Token\_GenerateDisposableTokenResponse', 'decode'], + $metadata, $options); + } + +} diff --git a/types/Token/_GenerateDisposableTokenRequest.php b/types/Token/_GenerateDisposableTokenRequest.php new file mode 100644 index 00000000..50db7347 --- /dev/null +++ b/types/Token/_GenerateDisposableTokenRequest.php @@ -0,0 +1,159 @@ +token._GenerateDisposableTokenRequest + */ +class _GenerateDisposableTokenRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .token._GenerateDisposableTokenRequest.Expires expires = 1; + */ + protected $expires = null; + /** + * Generated from protobuf field string auth_token = 2; + */ + protected $auth_token = ''; + /** + * Generated from protobuf field .permission_messages.Permissions permissions = 3; + */ + protected $permissions = null; + /** + * Generated from protobuf field string token_id = 4; + */ + protected $token_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Token\_GenerateDisposableTokenRequest\Expires $expires + * @type string $auth_token + * @type \Permission_messages\Permissions $permissions + * @type string $token_id + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Token::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .token._GenerateDisposableTokenRequest.Expires expires = 1; + * @return \Token\_GenerateDisposableTokenRequest\Expires|null + */ + public function getExpires() + { + return $this->expires; + } + + public function hasExpires() + { + return isset($this->expires); + } + + public function clearExpires() + { + unset($this->expires); + } + + /** + * Generated from protobuf field .token._GenerateDisposableTokenRequest.Expires expires = 1; + * @param \Token\_GenerateDisposableTokenRequest\Expires $var + * @return $this + */ + public function setExpires($var) + { + GPBUtil::checkMessage($var, \Token\_GenerateDisposableTokenRequest\Expires::class); + $this->expires = $var; + + return $this; + } + + /** + * Generated from protobuf field string auth_token = 2; + * @return string + */ + public function getAuthToken() + { + return $this->auth_token; + } + + /** + * Generated from protobuf field string auth_token = 2; + * @param string $var + * @return $this + */ + public function setAuthToken($var) + { + GPBUtil::checkString($var, True); + $this->auth_token = $var; + + return $this; + } + + /** + * Generated from protobuf field .permission_messages.Permissions permissions = 3; + * @return \Permission_messages\Permissions|null + */ + public function getPermissions() + { + return $this->permissions; + } + + public function hasPermissions() + { + return isset($this->permissions); + } + + public function clearPermissions() + { + unset($this->permissions); + } + + /** + * Generated from protobuf field .permission_messages.Permissions permissions = 3; + * @param \Permission_messages\Permissions $var + * @return $this + */ + public function setPermissions($var) + { + GPBUtil::checkMessage($var, \Permission_messages\Permissions::class); + $this->permissions = $var; + + return $this; + } + + /** + * Generated from protobuf field string token_id = 4; + * @return string + */ + public function getTokenId() + { + return $this->token_id; + } + + /** + * Generated from protobuf field string token_id = 4; + * @param string $var + * @return $this + */ + public function setTokenId($var) + { + GPBUtil::checkString($var, True); + $this->token_id = $var; + + return $this; + } + +} + diff --git a/types/Token/_GenerateDisposableTokenRequest/Expires.php b/types/Token/_GenerateDisposableTokenRequest/Expires.php new file mode 100644 index 00000000..c0970e09 --- /dev/null +++ b/types/Token/_GenerateDisposableTokenRequest/Expires.php @@ -0,0 +1,70 @@ +token._GenerateDisposableTokenRequest.Expires + */ +class Expires extends \Google\Protobuf\Internal\Message +{ + /** + * how many seconds do you want the api token to be valid for? + * + * Generated from protobuf field uint32 valid_for_seconds = 1; + */ + protected $valid_for_seconds = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $valid_for_seconds + * how many seconds do you want the api token to be valid for? + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Token::initOnce(); + parent::__construct($data); + } + + /** + * how many seconds do you want the api token to be valid for? + * + * Generated from protobuf field uint32 valid_for_seconds = 1; + * @return int + */ + public function getValidForSeconds() + { + return $this->valid_for_seconds; + } + + /** + * how many seconds do you want the api token to be valid for? + * + * Generated from protobuf field uint32 valid_for_seconds = 1; + * @param int $var + * @return $this + */ + public function setValidForSeconds($var) + { + GPBUtil::checkUint32($var); + $this->valid_for_seconds = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Expires::class, \Token\_GenerateDisposableTokenRequest_Expires::class); + diff --git a/types/Token/_GenerateDisposableTokenRequest_Expires.php b/types/Token/_GenerateDisposableTokenRequest_Expires.php new file mode 100644 index 00000000..a1bf08c3 --- /dev/null +++ b/types/Token/_GenerateDisposableTokenRequest_Expires.php @@ -0,0 +1,16 @@ +token._GenerateDisposableTokenResponse + */ +class _GenerateDisposableTokenResponse extends \Google\Protobuf\Internal\Message +{ + /** + * the new api key used for authentication against Momento backend + * + * Generated from protobuf field string api_key = 1; + */ + protected $api_key = ''; + /** + * the Momento endpoint that this token is allowed to make requests against + * + * Generated from protobuf field string endpoint = 2; + */ + protected $endpoint = ''; + /** + * epoch seconds when the api token expires + * + * Generated from protobuf field uint64 valid_until = 3; + */ + protected $valid_until = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $api_key + * the new api key used for authentication against Momento backend + * @type string $endpoint + * the Momento endpoint that this token is allowed to make requests against + * @type int|string $valid_until + * epoch seconds when the api token expires + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Token::initOnce(); + parent::__construct($data); + } + + /** + * the new api key used for authentication against Momento backend + * + * Generated from protobuf field string api_key = 1; + * @return string + */ + public function getApiKey() + { + return $this->api_key; + } + + /** + * the new api key used for authentication against Momento backend + * + * Generated from protobuf field string api_key = 1; + * @param string $var + * @return $this + */ + public function setApiKey($var) + { + GPBUtil::checkString($var, True); + $this->api_key = $var; + + return $this; + } + + /** + * the Momento endpoint that this token is allowed to make requests against + * + * Generated from protobuf field string endpoint = 2; + * @return string + */ + public function getEndpoint() + { + return $this->endpoint; + } + + /** + * the Momento endpoint that this token is allowed to make requests against + * + * Generated from protobuf field string endpoint = 2; + * @param string $var + * @return $this + */ + public function setEndpoint($var) + { + GPBUtil::checkString($var, True); + $this->endpoint = $var; + + return $this; + } + + /** + * epoch seconds when the api token expires + * + * Generated from protobuf field uint64 valid_until = 3; + * @return int|string + */ + public function getValidUntil() + { + return $this->valid_until; + } + + /** + * epoch seconds when the api token expires + * + * Generated from protobuf field uint64 valid_until = 3; + * @param int|string $var + * @return $this + */ + public function setValidUntil($var) + { + GPBUtil::checkUint64($var); + $this->valid_until = $var; + + return $this; + } + +} + diff --git a/types/Vectorindex/VectorIndexClient.php b/types/Vectorindex/VectorIndexClient.php new file mode 100644 index 00000000..970282e9 --- /dev/null +++ b/types/Vectorindex/VectorIndexClient.php @@ -0,0 +1,117 @@ +_simpleRequest('/vectorindex.VectorIndex/UpsertItemBatch', + $argument, + ['\Vectorindex\_UpsertItemBatchResponse', 'decode'], + $metadata, $options); + } + + /** + * @param \Vectorindex\_DeleteItemBatchRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteItemBatch(\Vectorindex\_DeleteItemBatchRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/vectorindex.VectorIndex/DeleteItemBatch', + $argument, + ['\Vectorindex\_DeleteItemBatchResponse', 'decode'], + $metadata, $options); + } + + /** + * @param \Vectorindex\_SearchRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function Search(\Vectorindex\_SearchRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/vectorindex.VectorIndex/Search', + $argument, + ['\Vectorindex\_SearchResponse', 'decode'], + $metadata, $options); + } + + /** + * @param \Vectorindex\_SearchAndFetchVectorsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function SearchAndFetchVectors(\Vectorindex\_SearchAndFetchVectorsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/vectorindex.VectorIndex/SearchAndFetchVectors', + $argument, + ['\Vectorindex\_SearchAndFetchVectorsResponse', 'decode'], + $metadata, $options); + } + + /** + * @param \Vectorindex\_GetItemMetadataBatchRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetItemMetadataBatch(\Vectorindex\_GetItemMetadataBatchRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/vectorindex.VectorIndex/GetItemMetadataBatch', + $argument, + ['\Vectorindex\_GetItemMetadataBatchResponse', 'decode'], + $metadata, $options); + } + + /** + * @param \Vectorindex\_GetItemBatchRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetItemBatch(\Vectorindex\_GetItemBatchRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/vectorindex.VectorIndex/GetItemBatch', + $argument, + ['\Vectorindex\_GetItemBatchResponse', 'decode'], + $metadata, $options); + } + + /** + * @param \Vectorindex\_CountItemsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CountItems(\Vectorindex\_CountItemsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/vectorindex.VectorIndex/CountItems', + $argument, + ['\Vectorindex\_CountItemsResponse', 'decode'], + $metadata, $options); + } + +} diff --git a/types/Vectorindex/_AndExpression.php b/types/Vectorindex/_AndExpression.php new file mode 100644 index 00000000..8dd87143 --- /dev/null +++ b/types/Vectorindex/_AndExpression.php @@ -0,0 +1,105 @@ +vectorindex._AndExpression + */ +class _AndExpression extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .vectorindex._FilterExpression first_expression = 1; + */ + protected $first_expression = null; + /** + * Generated from protobuf field .vectorindex._FilterExpression second_expression = 2; + */ + protected $second_expression = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Vectorindex\_FilterExpression $first_expression + * @type \Vectorindex\_FilterExpression $second_expression + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Vectorindex::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .vectorindex._FilterExpression first_expression = 1; + * @return \Vectorindex\_FilterExpression|null + */ + public function getFirstExpression() + { + return $this->first_expression; + } + + public function hasFirstExpression() + { + return isset($this->first_expression); + } + + public function clearFirstExpression() + { + unset($this->first_expression); + } + + /** + * Generated from protobuf field .vectorindex._FilterExpression first_expression = 1; + * @param \Vectorindex\_FilterExpression $var + * @return $this + */ + public function setFirstExpression($var) + { + GPBUtil::checkMessage($var, \Vectorindex\_FilterExpression::class); + $this->first_expression = $var; + + return $this; + } + + /** + * Generated from protobuf field .vectorindex._FilterExpression second_expression = 2; + * @return \Vectorindex\_FilterExpression|null + */ + public function getSecondExpression() + { + return $this->second_expression; + } + + public function hasSecondExpression() + { + return isset($this->second_expression); + } + + public function clearSecondExpression() + { + unset($this->second_expression); + } + + /** + * Generated from protobuf field .vectorindex._FilterExpression second_expression = 2; + * @param \Vectorindex\_FilterExpression $var + * @return $this + */ + public function setSecondExpression($var) + { + GPBUtil::checkMessage($var, \Vectorindex\_FilterExpression::class); + $this->second_expression = $var; + + return $this; + } + +} + diff --git a/types/Vectorindex/_CountItemsRequest.php b/types/Vectorindex/_CountItemsRequest.php new file mode 100644 index 00000000..ba3768a9 --- /dev/null +++ b/types/Vectorindex/_CountItemsRequest.php @@ -0,0 +1,95 @@ +vectorindex._CountItemsRequest + */ +class _CountItemsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string index_name = 1; + */ + protected $index_name = ''; + protected $filter; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $index_name + * @type \Vectorindex\_CountItemsRequest\All $all + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Vectorindex::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string index_name = 1; + * @return string + */ + public function getIndexName() + { + return $this->index_name; + } + + /** + * Generated from protobuf field string index_name = 1; + * @param string $var + * @return $this + */ + public function setIndexName($var) + { + GPBUtil::checkString($var, True); + $this->index_name = $var; + + return $this; + } + + /** + * Generated from protobuf field .vectorindex._CountItemsRequest.All all = 2; + * @return \Vectorindex\_CountItemsRequest\All|null + */ + public function getAll() + { + return $this->readOneof(2); + } + + public function hasAll() + { + return $this->hasOneof(2); + } + + /** + * Generated from protobuf field .vectorindex._CountItemsRequest.All all = 2; + * @param \Vectorindex\_CountItemsRequest\All $var + * @return $this + */ + public function setAll($var) + { + GPBUtil::checkMessage($var, \Vectorindex\_CountItemsRequest\All::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getFilter() + { + return $this->whichOneof("filter"); + } + +} + diff --git a/types/Vectorindex/_CountItemsRequest/All.php b/types/Vectorindex/_CountItemsRequest/All.php new file mode 100644 index 00000000..4538ae8e --- /dev/null +++ b/types/Vectorindex/_CountItemsRequest/All.php @@ -0,0 +1,34 @@ +vectorindex._CountItemsRequest.All + */ +class All extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Vectorindex::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(All::class, \Vectorindex\_CountItemsRequest_All::class); + diff --git a/types/Vectorindex/_CountItemsRequest_All.php b/types/Vectorindex/_CountItemsRequest_All.php new file mode 100644 index 00000000..7db4c36a --- /dev/null +++ b/types/Vectorindex/_CountItemsRequest_All.php @@ -0,0 +1,16 @@ +vectorindex._CountItemsResponse + */ +class _CountItemsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field uint64 item_count = 1; + */ + protected $item_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $item_count + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Vectorindex::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field uint64 item_count = 1; + * @return int|string + */ + public function getItemCount() + { + return $this->item_count; + } + + /** + * Generated from protobuf field uint64 item_count = 1; + * @param int|string $var + * @return $this + */ + public function setItemCount($var) + { + GPBUtil::checkUint64($var); + $this->item_count = $var; + + return $this; + } + +} + diff --git a/types/Vectorindex/_DeleteItemBatchRequest.php b/types/Vectorindex/_DeleteItemBatchRequest.php new file mode 100644 index 00000000..bdae24f3 --- /dev/null +++ b/types/Vectorindex/_DeleteItemBatchRequest.php @@ -0,0 +1,129 @@ +vectorindex._DeleteItemBatchRequest + */ +class _DeleteItemBatchRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string index_name = 1; + */ + protected $index_name = ''; + /** + * TODO: reserve after migration + * + * Generated from protobuf field repeated string ids = 2; + */ + private $ids; + /** + * Generated from protobuf field .vectorindex._FilterExpression filter = 3; + */ + protected $filter = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $index_name + * @type string[]|\Google\Protobuf\Internal\RepeatedField $ids + * TODO: reserve after migration + * @type \Vectorindex\_FilterExpression $filter + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Vectorindex::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string index_name = 1; + * @return string + */ + public function getIndexName() + { + return $this->index_name; + } + + /** + * Generated from protobuf field string index_name = 1; + * @param string $var + * @return $this + */ + public function setIndexName($var) + { + GPBUtil::checkString($var, True); + $this->index_name = $var; + + return $this; + } + + /** + * TODO: reserve after migration + * + * Generated from protobuf field repeated string ids = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIds() + { + return $this->ids; + } + + /** + * TODO: reserve after migration + * + * Generated from protobuf field repeated string ids = 2; + * @param string[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->ids = $arr; + + return $this; + } + + /** + * Generated from protobuf field .vectorindex._FilterExpression filter = 3; + * @return \Vectorindex\_FilterExpression|null + */ + public function getFilter() + { + return $this->filter; + } + + public function hasFilter() + { + return isset($this->filter); + } + + public function clearFilter() + { + unset($this->filter); + } + + /** + * Generated from protobuf field .vectorindex._FilterExpression filter = 3; + * @param \Vectorindex\_FilterExpression $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkMessage($var, \Vectorindex\_FilterExpression::class); + $this->filter = $var; + + return $this; + } + +} + diff --git a/types/Vectorindex/_DeleteItemBatchResponse.php b/types/Vectorindex/_DeleteItemBatchResponse.php new file mode 100644 index 00000000..d46fd4fa --- /dev/null +++ b/types/Vectorindex/_DeleteItemBatchResponse.php @@ -0,0 +1,31 @@ +vectorindex._DeleteItemBatchResponse + */ +class _DeleteItemBatchResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Vectorindex::initOnce(); + parent::__construct($data); + } + +} + diff --git a/types/Vectorindex/_EqualsExpression.php b/types/Vectorindex/_EqualsExpression.php new file mode 100644 index 00000000..e78aaee7 --- /dev/null +++ b/types/Vectorindex/_EqualsExpression.php @@ -0,0 +1,179 @@ +vectorindex._EqualsExpression + */ +class _EqualsExpression extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string field = 1; + */ + protected $field = ''; + protected $value; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $field + * @type string $string_value + * @type int|string $integer_value + * @type float $float_value + * @type bool $boolean_value + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Vectorindex::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string field = 1; + * @return string + */ + public function getField() + { + return $this->field; + } + + /** + * Generated from protobuf field string field = 1; + * @param string $var + * @return $this + */ + public function setField($var) + { + GPBUtil::checkString($var, True); + $this->field = $var; + + return $this; + } + + /** + * Generated from protobuf field string string_value = 2; + * @return string + */ + public function getStringValue() + { + return $this->readOneof(2); + } + + public function hasStringValue() + { + return $this->hasOneof(2); + } + + /** + * Generated from protobuf field string string_value = 2; + * @param string $var + * @return $this + */ + public function setStringValue($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Generated from protobuf field int64 integer_value = 3; + * @return int|string + */ + public function getIntegerValue() + { + return $this->readOneof(3); + } + + public function hasIntegerValue() + { + return $this->hasOneof(3); + } + + /** + * Generated from protobuf field int64 integer_value = 3; + * @param int|string $var + * @return $this + */ + public function setIntegerValue($var) + { + GPBUtil::checkInt64($var); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Generated from protobuf field float float_value = 4; + * @return float + */ + public function getFloatValue() + { + return $this->readOneof(4); + } + + public function hasFloatValue() + { + return $this->hasOneof(4); + } + + /** + * Generated from protobuf field float float_value = 4; + * @param float $var + * @return $this + */ + public function setFloatValue($var) + { + GPBUtil::checkFloat($var); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Generated from protobuf field bool boolean_value = 5; + * @return bool + */ + public function getBooleanValue() + { + return $this->readOneof(5); + } + + public function hasBooleanValue() + { + return $this->hasOneof(5); + } + + /** + * Generated from protobuf field bool boolean_value = 5; + * @param bool $var + * @return $this + */ + public function setBooleanValue($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * @return string + */ + public function getValue() + { + return $this->whichOneof("value"); + } + +} + diff --git a/types/Vectorindex/_FilterExpression.php b/types/Vectorindex/_FilterExpression.php new file mode 100644 index 00000000..e9ec2afe --- /dev/null +++ b/types/Vectorindex/_FilterExpression.php @@ -0,0 +1,320 @@ +vectorindex._FilterExpression + */ +class _FilterExpression extends \Google\Protobuf\Internal\Message +{ + protected $expression; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Vectorindex\_EqualsExpression $equals_expression + * @type \Vectorindex\_AndExpression $and_expression + * @type \Vectorindex\_OrExpression $or_expression + * @type \Vectorindex\_NotExpression $not_expression + * @type \Vectorindex\_GreaterThanExpression $greater_than_expression + * @type \Vectorindex\_GreaterThanOrEqualExpression $greater_than_or_equal_expression + * @type \Vectorindex\_LessThanExpression $less_than_expression + * @type \Vectorindex\_LessThanOrEqualExpression $less_than_or_equal_expression + * @type \Vectorindex\_ListContainsExpression $list_contains_expression + * @type \Vectorindex\_IdInSetExpression $id_in_set_expression + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Vectorindex::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .vectorindex._EqualsExpression equals_expression = 1; + * @return \Vectorindex\_EqualsExpression|null + */ + public function getEqualsExpression() + { + return $this->readOneof(1); + } + + public function hasEqualsExpression() + { + return $this->hasOneof(1); + } + + /** + * Generated from protobuf field .vectorindex._EqualsExpression equals_expression = 1; + * @param \Vectorindex\_EqualsExpression $var + * @return $this + */ + public function setEqualsExpression($var) + { + GPBUtil::checkMessage($var, \Vectorindex\_EqualsExpression::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Generated from protobuf field .vectorindex._AndExpression and_expression = 2; + * @return \Vectorindex\_AndExpression|null + */ + public function getAndExpression() + { + return $this->readOneof(2); + } + + public function hasAndExpression() + { + return $this->hasOneof(2); + } + + /** + * Generated from protobuf field .vectorindex._AndExpression and_expression = 2; + * @param \Vectorindex\_AndExpression $var + * @return $this + */ + public function setAndExpression($var) + { + GPBUtil::checkMessage($var, \Vectorindex\_AndExpression::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Generated from protobuf field .vectorindex._OrExpression or_expression = 3; + * @return \Vectorindex\_OrExpression|null + */ + public function getOrExpression() + { + return $this->readOneof(3); + } + + public function hasOrExpression() + { + return $this->hasOneof(3); + } + + /** + * Generated from protobuf field .vectorindex._OrExpression or_expression = 3; + * @param \Vectorindex\_OrExpression $var + * @return $this + */ + public function setOrExpression($var) + { + GPBUtil::checkMessage($var, \Vectorindex\_OrExpression::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Generated from protobuf field .vectorindex._NotExpression not_expression = 4; + * @return \Vectorindex\_NotExpression|null + */ + public function getNotExpression() + { + return $this->readOneof(4); + } + + public function hasNotExpression() + { + return $this->hasOneof(4); + } + + /** + * Generated from protobuf field .vectorindex._NotExpression not_expression = 4; + * @param \Vectorindex\_NotExpression $var + * @return $this + */ + public function setNotExpression($var) + { + GPBUtil::checkMessage($var, \Vectorindex\_NotExpression::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Generated from protobuf field .vectorindex._GreaterThanExpression greater_than_expression = 5; + * @return \Vectorindex\_GreaterThanExpression|null + */ + public function getGreaterThanExpression() + { + return $this->readOneof(5); + } + + public function hasGreaterThanExpression() + { + return $this->hasOneof(5); + } + + /** + * Generated from protobuf field .vectorindex._GreaterThanExpression greater_than_expression = 5; + * @param \Vectorindex\_GreaterThanExpression $var + * @return $this + */ + public function setGreaterThanExpression($var) + { + GPBUtil::checkMessage($var, \Vectorindex\_GreaterThanExpression::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Generated from protobuf field .vectorindex._GreaterThanOrEqualExpression greater_than_or_equal_expression = 6; + * @return \Vectorindex\_GreaterThanOrEqualExpression|null + */ + public function getGreaterThanOrEqualExpression() + { + return $this->readOneof(6); + } + + public function hasGreaterThanOrEqualExpression() + { + return $this->hasOneof(6); + } + + /** + * Generated from protobuf field .vectorindex._GreaterThanOrEqualExpression greater_than_or_equal_expression = 6; + * @param \Vectorindex\_GreaterThanOrEqualExpression $var + * @return $this + */ + public function setGreaterThanOrEqualExpression($var) + { + GPBUtil::checkMessage($var, \Vectorindex\_GreaterThanOrEqualExpression::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Generated from protobuf field .vectorindex._LessThanExpression less_than_expression = 7; + * @return \Vectorindex\_LessThanExpression|null + */ + public function getLessThanExpression() + { + return $this->readOneof(7); + } + + public function hasLessThanExpression() + { + return $this->hasOneof(7); + } + + /** + * Generated from protobuf field .vectorindex._LessThanExpression less_than_expression = 7; + * @param \Vectorindex\_LessThanExpression $var + * @return $this + */ + public function setLessThanExpression($var) + { + GPBUtil::checkMessage($var, \Vectorindex\_LessThanExpression::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Generated from protobuf field .vectorindex._LessThanOrEqualExpression less_than_or_equal_expression = 8; + * @return \Vectorindex\_LessThanOrEqualExpression|null + */ + public function getLessThanOrEqualExpression() + { + return $this->readOneof(8); + } + + public function hasLessThanOrEqualExpression() + { + return $this->hasOneof(8); + } + + /** + * Generated from protobuf field .vectorindex._LessThanOrEqualExpression less_than_or_equal_expression = 8; + * @param \Vectorindex\_LessThanOrEqualExpression $var + * @return $this + */ + public function setLessThanOrEqualExpression($var) + { + GPBUtil::checkMessage($var, \Vectorindex\_LessThanOrEqualExpression::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Generated from protobuf field .vectorindex._ListContainsExpression list_contains_expression = 9; + * @return \Vectorindex\_ListContainsExpression|null + */ + public function getListContainsExpression() + { + return $this->readOneof(9); + } + + public function hasListContainsExpression() + { + return $this->hasOneof(9); + } + + /** + * Generated from protobuf field .vectorindex._ListContainsExpression list_contains_expression = 9; + * @param \Vectorindex\_ListContainsExpression $var + * @return $this + */ + public function setListContainsExpression($var) + { + GPBUtil::checkMessage($var, \Vectorindex\_ListContainsExpression::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * Generated from protobuf field .vectorindex._IdInSetExpression id_in_set_expression = 10; + * @return \Vectorindex\_IdInSetExpression|null + */ + public function getIdInSetExpression() + { + return $this->readOneof(10); + } + + public function hasIdInSetExpression() + { + return $this->hasOneof(10); + } + + /** + * Generated from protobuf field .vectorindex._IdInSetExpression id_in_set_expression = 10; + * @param \Vectorindex\_IdInSetExpression $var + * @return $this + */ + public function setIdInSetExpression($var) + { + GPBUtil::checkMessage($var, \Vectorindex\_IdInSetExpression::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * @return string + */ + public function getExpression() + { + return $this->whichOneof("expression"); + } + +} + diff --git a/types/Vectorindex/_GetItemBatchRequest.php b/types/Vectorindex/_GetItemBatchRequest.php new file mode 100644 index 00000000..0e9a8b44 --- /dev/null +++ b/types/Vectorindex/_GetItemBatchRequest.php @@ -0,0 +1,159 @@ +vectorindex._GetItemBatchRequest + */ +class _GetItemBatchRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string index_name = 1; + */ + protected $index_name = ''; + /** + * Generated from protobuf field repeated string ids = 2; + */ + private $ids; + /** + * Generated from protobuf field .vectorindex._MetadataRequest metadata_fields = 3; + */ + protected $metadata_fields = null; + /** + * Generated from protobuf field .vectorindex._FilterExpression filter = 4; + */ + protected $filter = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $index_name + * @type string[]|\Google\Protobuf\Internal\RepeatedField $ids + * @type \Vectorindex\_MetadataRequest $metadata_fields + * @type \Vectorindex\_FilterExpression $filter + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Vectorindex::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string index_name = 1; + * @return string + */ + public function getIndexName() + { + return $this->index_name; + } + + /** + * Generated from protobuf field string index_name = 1; + * @param string $var + * @return $this + */ + public function setIndexName($var) + { + GPBUtil::checkString($var, True); + $this->index_name = $var; + + return $this; + } + + /** + * Generated from protobuf field repeated string ids = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIds() + { + return $this->ids; + } + + /** + * Generated from protobuf field repeated string ids = 2; + * @param string[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->ids = $arr; + + return $this; + } + + /** + * Generated from protobuf field .vectorindex._MetadataRequest metadata_fields = 3; + * @return \Vectorindex\_MetadataRequest|null + */ + public function getMetadataFields() + { + return $this->metadata_fields; + } + + public function hasMetadataFields() + { + return isset($this->metadata_fields); + } + + public function clearMetadataFields() + { + unset($this->metadata_fields); + } + + /** + * Generated from protobuf field .vectorindex._MetadataRequest metadata_fields = 3; + * @param \Vectorindex\_MetadataRequest $var + * @return $this + */ + public function setMetadataFields($var) + { + GPBUtil::checkMessage($var, \Vectorindex\_MetadataRequest::class); + $this->metadata_fields = $var; + + return $this; + } + + /** + * Generated from protobuf field .vectorindex._FilterExpression filter = 4; + * @return \Vectorindex\_FilterExpression|null + */ + public function getFilter() + { + return $this->filter; + } + + public function hasFilter() + { + return isset($this->filter); + } + + public function clearFilter() + { + unset($this->filter); + } + + /** + * Generated from protobuf field .vectorindex._FilterExpression filter = 4; + * @param \Vectorindex\_FilterExpression $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkMessage($var, \Vectorindex\_FilterExpression::class); + $this->filter = $var; + + return $this; + } + +} + diff --git a/types/Vectorindex/_GetItemBatchResponse.php b/types/Vectorindex/_GetItemBatchResponse.php new file mode 100644 index 00000000..c411e78f --- /dev/null +++ b/types/Vectorindex/_GetItemBatchResponse.php @@ -0,0 +1,58 @@ +vectorindex._GetItemBatchResponse + */ +class _GetItemBatchResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .vectorindex._ItemResponse item_response = 1; + */ + private $item_response; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Vectorindex\_ItemResponse[]|\Google\Protobuf\Internal\RepeatedField $item_response + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Vectorindex::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .vectorindex._ItemResponse item_response = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItemResponse() + { + return $this->item_response; + } + + /** + * Generated from protobuf field repeated .vectorindex._ItemResponse item_response = 1; + * @param \Vectorindex\_ItemResponse[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItemResponse($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Vectorindex\_ItemResponse::class); + $this->item_response = $arr; + + return $this; + } + +} + diff --git a/types/Vectorindex/_GetItemMetadataBatchRequest.php b/types/Vectorindex/_GetItemMetadataBatchRequest.php new file mode 100644 index 00000000..43eba5bb --- /dev/null +++ b/types/Vectorindex/_GetItemMetadataBatchRequest.php @@ -0,0 +1,166 @@ +vectorindex._GetItemMetadataBatchRequest + */ +class _GetItemMetadataBatchRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string index_name = 1; + */ + protected $index_name = ''; + /** + * TODO: reserve after migration + * + * Generated from protobuf field repeated string ids = 2; + */ + private $ids; + /** + * Generated from protobuf field .vectorindex._MetadataRequest metadata_fields = 3; + */ + protected $metadata_fields = null; + /** + * Generated from protobuf field .vectorindex._FilterExpression filter = 4; + */ + protected $filter = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $index_name + * @type string[]|\Google\Protobuf\Internal\RepeatedField $ids + * TODO: reserve after migration + * @type \Vectorindex\_MetadataRequest $metadata_fields + * @type \Vectorindex\_FilterExpression $filter + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Vectorindex::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string index_name = 1; + * @return string + */ + public function getIndexName() + { + return $this->index_name; + } + + /** + * Generated from protobuf field string index_name = 1; + * @param string $var + * @return $this + */ + public function setIndexName($var) + { + GPBUtil::checkString($var, True); + $this->index_name = $var; + + return $this; + } + + /** + * TODO: reserve after migration + * + * Generated from protobuf field repeated string ids = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIds() + { + return $this->ids; + } + + /** + * TODO: reserve after migration + * + * Generated from protobuf field repeated string ids = 2; + * @param string[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->ids = $arr; + + return $this; + } + + /** + * Generated from protobuf field .vectorindex._MetadataRequest metadata_fields = 3; + * @return \Vectorindex\_MetadataRequest|null + */ + public function getMetadataFields() + { + return $this->metadata_fields; + } + + public function hasMetadataFields() + { + return isset($this->metadata_fields); + } + + public function clearMetadataFields() + { + unset($this->metadata_fields); + } + + /** + * Generated from protobuf field .vectorindex._MetadataRequest metadata_fields = 3; + * @param \Vectorindex\_MetadataRequest $var + * @return $this + */ + public function setMetadataFields($var) + { + GPBUtil::checkMessage($var, \Vectorindex\_MetadataRequest::class); + $this->metadata_fields = $var; + + return $this; + } + + /** + * Generated from protobuf field .vectorindex._FilterExpression filter = 4; + * @return \Vectorindex\_FilterExpression|null + */ + public function getFilter() + { + return $this->filter; + } + + public function hasFilter() + { + return isset($this->filter); + } + + public function clearFilter() + { + unset($this->filter); + } + + /** + * Generated from protobuf field .vectorindex._FilterExpression filter = 4; + * @param \Vectorindex\_FilterExpression $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkMessage($var, \Vectorindex\_FilterExpression::class); + $this->filter = $var; + + return $this; + } + +} + diff --git a/types/Vectorindex/_GetItemMetadataBatchResponse.php b/types/Vectorindex/_GetItemMetadataBatchResponse.php new file mode 100644 index 00000000..984976da --- /dev/null +++ b/types/Vectorindex/_GetItemMetadataBatchResponse.php @@ -0,0 +1,58 @@ +vectorindex._GetItemMetadataBatchResponse + */ +class _GetItemMetadataBatchResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .vectorindex._ItemMetadataResponse item_metadata_response = 1; + */ + private $item_metadata_response; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Vectorindex\_ItemMetadataResponse[]|\Google\Protobuf\Internal\RepeatedField $item_metadata_response + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Vectorindex::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .vectorindex._ItemMetadataResponse item_metadata_response = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItemMetadataResponse() + { + return $this->item_metadata_response; + } + + /** + * Generated from protobuf field repeated .vectorindex._ItemMetadataResponse item_metadata_response = 1; + * @param \Vectorindex\_ItemMetadataResponse[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItemMetadataResponse($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Vectorindex\_ItemMetadataResponse::class); + $this->item_metadata_response = $arr; + + return $this; + } + +} + diff --git a/types/Vectorindex/_GreaterThanExpression.php b/types/Vectorindex/_GreaterThanExpression.php new file mode 100644 index 00000000..675d43c4 --- /dev/null +++ b/types/Vectorindex/_GreaterThanExpression.php @@ -0,0 +1,123 @@ +vectorindex._GreaterThanExpression + */ +class _GreaterThanExpression extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string field = 1; + */ + protected $field = ''; + protected $value; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $field + * @type int|string $integer_value + * @type float $float_value + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Vectorindex::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string field = 1; + * @return string + */ + public function getField() + { + return $this->field; + } + + /** + * Generated from protobuf field string field = 1; + * @param string $var + * @return $this + */ + public function setField($var) + { + GPBUtil::checkString($var, True); + $this->field = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 integer_value = 2; + * @return int|string + */ + public function getIntegerValue() + { + return $this->readOneof(2); + } + + public function hasIntegerValue() + { + return $this->hasOneof(2); + } + + /** + * Generated from protobuf field int64 integer_value = 2; + * @param int|string $var + * @return $this + */ + public function setIntegerValue($var) + { + GPBUtil::checkInt64($var); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Generated from protobuf field float float_value = 3; + * @return float + */ + public function getFloatValue() + { + return $this->readOneof(3); + } + + public function hasFloatValue() + { + return $this->hasOneof(3); + } + + /** + * Generated from protobuf field float float_value = 3; + * @param float $var + * @return $this + */ + public function setFloatValue($var) + { + GPBUtil::checkFloat($var); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getValue() + { + return $this->whichOneof("value"); + } + +} + diff --git a/types/Vectorindex/_GreaterThanOrEqualExpression.php b/types/Vectorindex/_GreaterThanOrEqualExpression.php new file mode 100644 index 00000000..90500cf9 --- /dev/null +++ b/types/Vectorindex/_GreaterThanOrEqualExpression.php @@ -0,0 +1,123 @@ +vectorindex._GreaterThanOrEqualExpression + */ +class _GreaterThanOrEqualExpression extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string field = 1; + */ + protected $field = ''; + protected $value; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $field + * @type int|string $integer_value + * @type float $float_value + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Vectorindex::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string field = 1; + * @return string + */ + public function getField() + { + return $this->field; + } + + /** + * Generated from protobuf field string field = 1; + * @param string $var + * @return $this + */ + public function setField($var) + { + GPBUtil::checkString($var, True); + $this->field = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 integer_value = 2; + * @return int|string + */ + public function getIntegerValue() + { + return $this->readOneof(2); + } + + public function hasIntegerValue() + { + return $this->hasOneof(2); + } + + /** + * Generated from protobuf field int64 integer_value = 2; + * @param int|string $var + * @return $this + */ + public function setIntegerValue($var) + { + GPBUtil::checkInt64($var); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Generated from protobuf field float float_value = 3; + * @return float + */ + public function getFloatValue() + { + return $this->readOneof(3); + } + + public function hasFloatValue() + { + return $this->hasOneof(3); + } + + /** + * Generated from protobuf field float float_value = 3; + * @param float $var + * @return $this + */ + public function setFloatValue($var) + { + GPBUtil::checkFloat($var); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getValue() + { + return $this->whichOneof("value"); + } + +} + diff --git a/types/Vectorindex/_IdInSetExpression.php b/types/Vectorindex/_IdInSetExpression.php new file mode 100644 index 00000000..35bb4fda --- /dev/null +++ b/types/Vectorindex/_IdInSetExpression.php @@ -0,0 +1,58 @@ +vectorindex._IdInSetExpression + */ +class _IdInSetExpression extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated string ids = 1; + */ + private $ids; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string[]|\Google\Protobuf\Internal\RepeatedField $ids + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Vectorindex::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated string ids = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIds() + { + return $this->ids; + } + + /** + * Generated from protobuf field repeated string ids = 1; + * @param string[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->ids = $arr; + + return $this; + } + +} + diff --git a/types/Vectorindex/_Item.php b/types/Vectorindex/_Item.php new file mode 100644 index 00000000..0a9fce92 --- /dev/null +++ b/types/Vectorindex/_Item.php @@ -0,0 +1,122 @@ +vectorindex._Item + */ +class _Item extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + /** + * Generated from protobuf field .vectorindex._Vector vector = 2; + */ + protected $vector = null; + /** + * Generated from protobuf field repeated .vectorindex._Metadata metadata = 3; + */ + private $metadata; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * @type \Vectorindex\_Vector $vector + * @type \Vectorindex\_Metadata[]|\Google\Protobuf\Internal\RepeatedField $metadata + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Vectorindex::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Generated from protobuf field string id = 1; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * Generated from protobuf field .vectorindex._Vector vector = 2; + * @return \Vectorindex\_Vector|null + */ + public function getVector() + { + return $this->vector; + } + + public function hasVector() + { + return isset($this->vector); + } + + public function clearVector() + { + unset($this->vector); + } + + /** + * Generated from protobuf field .vectorindex._Vector vector = 2; + * @param \Vectorindex\_Vector $var + * @return $this + */ + public function setVector($var) + { + GPBUtil::checkMessage($var, \Vectorindex\_Vector::class); + $this->vector = $var; + + return $this; + } + + /** + * Generated from protobuf field repeated .vectorindex._Metadata metadata = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMetadata() + { + return $this->metadata; + } + + /** + * Generated from protobuf field repeated .vectorindex._Metadata metadata = 3; + * @param \Vectorindex\_Metadata[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMetadata($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Vectorindex\_Metadata::class); + $this->metadata = $arr; + + return $this; + } + +} + diff --git a/types/Vectorindex/_ItemMetadataResponse.php b/types/Vectorindex/_ItemMetadataResponse.php new file mode 100644 index 00000000..e921aa15 --- /dev/null +++ b/types/Vectorindex/_ItemMetadataResponse.php @@ -0,0 +1,160 @@ +vectorindex._ItemMetadataResponse + */ +class _ItemMetadataResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string id = 3; + */ + protected $id = ''; + /** + * Generated from protobuf field repeated .vectorindex._Metadata metadata = 4; + */ + private $metadata; + protected $response; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Vectorindex\_ItemMetadataResponse\_Miss $miss + * TODO: reserve after migration + * @type \Vectorindex\_ItemMetadataResponse\_Hit $hit + * TODO: reserve after migration + * @type string $id + * @type \Vectorindex\_Metadata[]|\Google\Protobuf\Internal\RepeatedField $metadata + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Vectorindex::initOnce(); + parent::__construct($data); + } + + /** + * TODO: reserve after migration + * + * Generated from protobuf field .vectorindex._ItemMetadataResponse._Miss miss = 1; + * @return \Vectorindex\_ItemMetadataResponse\_Miss|null + */ + public function getMiss() + { + return $this->readOneof(1); + } + + public function hasMiss() + { + return $this->hasOneof(1); + } + + /** + * TODO: reserve after migration + * + * Generated from protobuf field .vectorindex._ItemMetadataResponse._Miss miss = 1; + * @param \Vectorindex\_ItemMetadataResponse\_Miss $var + * @return $this + */ + public function setMiss($var) + { + GPBUtil::checkMessage($var, \Vectorindex\_ItemMetadataResponse\_Miss::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * TODO: reserve after migration + * + * Generated from protobuf field .vectorindex._ItemMetadataResponse._Hit hit = 2; + * @return \Vectorindex\_ItemMetadataResponse\_Hit|null + */ + public function getHit() + { + return $this->readOneof(2); + } + + public function hasHit() + { + return $this->hasOneof(2); + } + + /** + * TODO: reserve after migration + * + * Generated from protobuf field .vectorindex._ItemMetadataResponse._Hit hit = 2; + * @param \Vectorindex\_ItemMetadataResponse\_Hit $var + * @return $this + */ + public function setHit($var) + { + GPBUtil::checkMessage($var, \Vectorindex\_ItemMetadataResponse\_Hit::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Generated from protobuf field string id = 3; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Generated from protobuf field string id = 3; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * Generated from protobuf field repeated .vectorindex._Metadata metadata = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMetadata() + { + return $this->metadata; + } + + /** + * Generated from protobuf field repeated .vectorindex._Metadata metadata = 4; + * @param \Vectorindex\_Metadata[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMetadata($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Vectorindex\_Metadata::class); + $this->metadata = $arr; + + return $this; + } + + /** + * @return string + */ + public function getResponse() + { + return $this->whichOneof("response"); + } + +} + diff --git a/types/Vectorindex/_ItemMetadataResponse/_Hit.php b/types/Vectorindex/_ItemMetadataResponse/_Hit.php new file mode 100644 index 00000000..0849bed0 --- /dev/null +++ b/types/Vectorindex/_ItemMetadataResponse/_Hit.php @@ -0,0 +1,88 @@ +vectorindex._ItemMetadataResponse._Hit + */ +class _Hit extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + /** + * Generated from protobuf field repeated .vectorindex._Metadata metadata = 2; + */ + private $metadata; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * @type \Vectorindex\_Metadata[]|\Google\Protobuf\Internal\RepeatedField $metadata + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Vectorindex::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Generated from protobuf field string id = 1; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * Generated from protobuf field repeated .vectorindex._Metadata metadata = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMetadata() + { + return $this->metadata; + } + + /** + * Generated from protobuf field repeated .vectorindex._Metadata metadata = 2; + * @param \Vectorindex\_Metadata[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMetadata($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Vectorindex\_Metadata::class); + $this->metadata = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(_Hit::class, \Vectorindex\_ItemMetadataResponse__Hit::class); + diff --git a/types/Vectorindex/_ItemMetadataResponse/_Miss.php b/types/Vectorindex/_ItemMetadataResponse/_Miss.php new file mode 100644 index 00000000..1cfa3f61 --- /dev/null +++ b/types/Vectorindex/_ItemMetadataResponse/_Miss.php @@ -0,0 +1,34 @@ +vectorindex._ItemMetadataResponse._Miss + */ +class _Miss extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Vectorindex::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(_Miss::class, \Vectorindex\_ItemMetadataResponse__Miss::class); + diff --git a/types/Vectorindex/_ItemMetadataResponse__Hit.php b/types/Vectorindex/_ItemMetadataResponse__Hit.php new file mode 100644 index 00000000..9956e588 --- /dev/null +++ b/types/Vectorindex/_ItemMetadataResponse__Hit.php @@ -0,0 +1,16 @@ +vectorindex._ItemResponse + */ +class _ItemResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string id = 3; + */ + protected $id = ''; + /** + * Generated from protobuf field .vectorindex._Vector vector = 4; + */ + protected $vector = null; + /** + * Generated from protobuf field repeated .vectorindex._Metadata metadata = 5; + */ + private $metadata; + protected $response; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Vectorindex\_ItemResponse\_Miss $miss + * TODO: reserve after migration + * @type \Vectorindex\_ItemResponse\_Hit $hit + * TODO: reserve after migration + * @type string $id + * @type \Vectorindex\_Vector $vector + * @type \Vectorindex\_Metadata[]|\Google\Protobuf\Internal\RepeatedField $metadata + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Vectorindex::initOnce(); + parent::__construct($data); + } + + /** + * TODO: reserve after migration + * + * Generated from protobuf field .vectorindex._ItemResponse._Miss miss = 1; + * @return \Vectorindex\_ItemResponse\_Miss|null + */ + public function getMiss() + { + return $this->readOneof(1); + } + + public function hasMiss() + { + return $this->hasOneof(1); + } + + /** + * TODO: reserve after migration + * + * Generated from protobuf field .vectorindex._ItemResponse._Miss miss = 1; + * @param \Vectorindex\_ItemResponse\_Miss $var + * @return $this + */ + public function setMiss($var) + { + GPBUtil::checkMessage($var, \Vectorindex\_ItemResponse\_Miss::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * TODO: reserve after migration + * + * Generated from protobuf field .vectorindex._ItemResponse._Hit hit = 2; + * @return \Vectorindex\_ItemResponse\_Hit|null + */ + public function getHit() + { + return $this->readOneof(2); + } + + public function hasHit() + { + return $this->hasOneof(2); + } + + /** + * TODO: reserve after migration + * + * Generated from protobuf field .vectorindex._ItemResponse._Hit hit = 2; + * @param \Vectorindex\_ItemResponse\_Hit $var + * @return $this + */ + public function setHit($var) + { + GPBUtil::checkMessage($var, \Vectorindex\_ItemResponse\_Hit::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Generated from protobuf field string id = 3; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Generated from protobuf field string id = 3; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * Generated from protobuf field .vectorindex._Vector vector = 4; + * @return \Vectorindex\_Vector|null + */ + public function getVector() + { + return $this->vector; + } + + public function hasVector() + { + return isset($this->vector); + } + + public function clearVector() + { + unset($this->vector); + } + + /** + * Generated from protobuf field .vectorindex._Vector vector = 4; + * @param \Vectorindex\_Vector $var + * @return $this + */ + public function setVector($var) + { + GPBUtil::checkMessage($var, \Vectorindex\_Vector::class); + $this->vector = $var; + + return $this; + } + + /** + * Generated from protobuf field repeated .vectorindex._Metadata metadata = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMetadata() + { + return $this->metadata; + } + + /** + * Generated from protobuf field repeated .vectorindex._Metadata metadata = 5; + * @param \Vectorindex\_Metadata[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMetadata($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Vectorindex\_Metadata::class); + $this->metadata = $arr; + + return $this; + } + + /** + * @return string + */ + public function getResponse() + { + return $this->whichOneof("response"); + } + +} + diff --git a/types/Vectorindex/_ItemResponse/_Hit.php b/types/Vectorindex/_ItemResponse/_Hit.php new file mode 100644 index 00000000..db2aa3eb --- /dev/null +++ b/types/Vectorindex/_ItemResponse/_Hit.php @@ -0,0 +1,125 @@ +vectorindex._ItemResponse._Hit + */ +class _Hit extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + /** + * Generated from protobuf field .vectorindex._Vector vector = 2; + */ + protected $vector = null; + /** + * Generated from protobuf field repeated .vectorindex._Metadata metadata = 3; + */ + private $metadata; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * @type \Vectorindex\_Vector $vector + * @type \Vectorindex\_Metadata[]|\Google\Protobuf\Internal\RepeatedField $metadata + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Vectorindex::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Generated from protobuf field string id = 1; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * Generated from protobuf field .vectorindex._Vector vector = 2; + * @return \Vectorindex\_Vector|null + */ + public function getVector() + { + return $this->vector; + } + + public function hasVector() + { + return isset($this->vector); + } + + public function clearVector() + { + unset($this->vector); + } + + /** + * Generated from protobuf field .vectorindex._Vector vector = 2; + * @param \Vectorindex\_Vector $var + * @return $this + */ + public function setVector($var) + { + GPBUtil::checkMessage($var, \Vectorindex\_Vector::class); + $this->vector = $var; + + return $this; + } + + /** + * Generated from protobuf field repeated .vectorindex._Metadata metadata = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMetadata() + { + return $this->metadata; + } + + /** + * Generated from protobuf field repeated .vectorindex._Metadata metadata = 3; + * @param \Vectorindex\_Metadata[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMetadata($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Vectorindex\_Metadata::class); + $this->metadata = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(_Hit::class, \Vectorindex\_ItemResponse__Hit::class); + diff --git a/types/Vectorindex/_ItemResponse/_Miss.php b/types/Vectorindex/_ItemResponse/_Miss.php new file mode 100644 index 00000000..14656f51 --- /dev/null +++ b/types/Vectorindex/_ItemResponse/_Miss.php @@ -0,0 +1,34 @@ +vectorindex._ItemResponse._Miss + */ +class _Miss extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Vectorindex::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(_Miss::class, \Vectorindex\_ItemResponse__Miss::class); + diff --git a/types/Vectorindex/_ItemResponse__Hit.php b/types/Vectorindex/_ItemResponse__Hit.php new file mode 100644 index 00000000..9f120564 --- /dev/null +++ b/types/Vectorindex/_ItemResponse__Hit.php @@ -0,0 +1,16 @@ +vectorindex._LessThanExpression + */ +class _LessThanExpression extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string field = 1; + */ + protected $field = ''; + protected $value; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $field + * @type int|string $integer_value + * @type float $float_value + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Vectorindex::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string field = 1; + * @return string + */ + public function getField() + { + return $this->field; + } + + /** + * Generated from protobuf field string field = 1; + * @param string $var + * @return $this + */ + public function setField($var) + { + GPBUtil::checkString($var, True); + $this->field = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 integer_value = 2; + * @return int|string + */ + public function getIntegerValue() + { + return $this->readOneof(2); + } + + public function hasIntegerValue() + { + return $this->hasOneof(2); + } + + /** + * Generated from protobuf field int64 integer_value = 2; + * @param int|string $var + * @return $this + */ + public function setIntegerValue($var) + { + GPBUtil::checkInt64($var); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Generated from protobuf field float float_value = 3; + * @return float + */ + public function getFloatValue() + { + return $this->readOneof(3); + } + + public function hasFloatValue() + { + return $this->hasOneof(3); + } + + /** + * Generated from protobuf field float float_value = 3; + * @param float $var + * @return $this + */ + public function setFloatValue($var) + { + GPBUtil::checkFloat($var); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getValue() + { + return $this->whichOneof("value"); + } + +} + diff --git a/types/Vectorindex/_LessThanOrEqualExpression.php b/types/Vectorindex/_LessThanOrEqualExpression.php new file mode 100644 index 00000000..89b9ac84 --- /dev/null +++ b/types/Vectorindex/_LessThanOrEqualExpression.php @@ -0,0 +1,123 @@ +vectorindex._LessThanOrEqualExpression + */ +class _LessThanOrEqualExpression extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string field = 1; + */ + protected $field = ''; + protected $value; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $field + * @type int|string $integer_value + * @type float $float_value + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Vectorindex::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string field = 1; + * @return string + */ + public function getField() + { + return $this->field; + } + + /** + * Generated from protobuf field string field = 1; + * @param string $var + * @return $this + */ + public function setField($var) + { + GPBUtil::checkString($var, True); + $this->field = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 integer_value = 2; + * @return int|string + */ + public function getIntegerValue() + { + return $this->readOneof(2); + } + + public function hasIntegerValue() + { + return $this->hasOneof(2); + } + + /** + * Generated from protobuf field int64 integer_value = 2; + * @param int|string $var + * @return $this + */ + public function setIntegerValue($var) + { + GPBUtil::checkInt64($var); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Generated from protobuf field float float_value = 3; + * @return float + */ + public function getFloatValue() + { + return $this->readOneof(3); + } + + public function hasFloatValue() + { + return $this->hasOneof(3); + } + + /** + * Generated from protobuf field float float_value = 3; + * @param float $var + * @return $this + */ + public function setFloatValue($var) + { + GPBUtil::checkFloat($var); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getValue() + { + return $this->whichOneof("value"); + } + +} + diff --git a/types/Vectorindex/_ListContainsExpression.php b/types/Vectorindex/_ListContainsExpression.php new file mode 100644 index 00000000..6df4ba87 --- /dev/null +++ b/types/Vectorindex/_ListContainsExpression.php @@ -0,0 +1,95 @@ +vectorindex._ListContainsExpression + */ +class _ListContainsExpression extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string field = 1; + */ + protected $field = ''; + protected $value; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $field + * @type string $string_value + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Vectorindex::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string field = 1; + * @return string + */ + public function getField() + { + return $this->field; + } + + /** + * Generated from protobuf field string field = 1; + * @param string $var + * @return $this + */ + public function setField($var) + { + GPBUtil::checkString($var, True); + $this->field = $var; + + return $this; + } + + /** + * Generated from protobuf field string string_value = 2; + * @return string + */ + public function getStringValue() + { + return $this->readOneof(2); + } + + public function hasStringValue() + { + return $this->hasOneof(2); + } + + /** + * Generated from protobuf field string string_value = 2; + * @param string $var + * @return $this + */ + public function setStringValue($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getValue() + { + return $this->whichOneof("value"); + } + +} + diff --git a/types/Vectorindex/_Metadata.php b/types/Vectorindex/_Metadata.php new file mode 100644 index 00000000..64933729 --- /dev/null +++ b/types/Vectorindex/_Metadata.php @@ -0,0 +1,207 @@ +vectorindex._Metadata + */ +class _Metadata extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string field = 1; + */ + protected $field = ''; + protected $value; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $field + * @type string $string_value + * @type int|string $integer_value + * @type float $double_value + * @type bool $boolean_value + * @type \Vectorindex\_Metadata\_ListOfStrings $list_of_strings_value + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Vectorindex::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string field = 1; + * @return string + */ + public function getField() + { + return $this->field; + } + + /** + * Generated from protobuf field string field = 1; + * @param string $var + * @return $this + */ + public function setField($var) + { + GPBUtil::checkString($var, True); + $this->field = $var; + + return $this; + } + + /** + * Generated from protobuf field string string_value = 2; + * @return string + */ + public function getStringValue() + { + return $this->readOneof(2); + } + + public function hasStringValue() + { + return $this->hasOneof(2); + } + + /** + * Generated from protobuf field string string_value = 2; + * @param string $var + * @return $this + */ + public function setStringValue($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Generated from protobuf field int64 integer_value = 3; + * @return int|string + */ + public function getIntegerValue() + { + return $this->readOneof(3); + } + + public function hasIntegerValue() + { + return $this->hasOneof(3); + } + + /** + * Generated from protobuf field int64 integer_value = 3; + * @param int|string $var + * @return $this + */ + public function setIntegerValue($var) + { + GPBUtil::checkInt64($var); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Generated from protobuf field double double_value = 4; + * @return float + */ + public function getDoubleValue() + { + return $this->readOneof(4); + } + + public function hasDoubleValue() + { + return $this->hasOneof(4); + } + + /** + * Generated from protobuf field double double_value = 4; + * @param float $var + * @return $this + */ + public function setDoubleValue($var) + { + GPBUtil::checkDouble($var); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Generated from protobuf field bool boolean_value = 5; + * @return bool + */ + public function getBooleanValue() + { + return $this->readOneof(5); + } + + public function hasBooleanValue() + { + return $this->hasOneof(5); + } + + /** + * Generated from protobuf field bool boolean_value = 5; + * @param bool $var + * @return $this + */ + public function setBooleanValue($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Generated from protobuf field .vectorindex._Metadata._ListOfStrings list_of_strings_value = 6; + * @return \Vectorindex\_Metadata\_ListOfStrings|null + */ + public function getListOfStringsValue() + { + return $this->readOneof(6); + } + + public function hasListOfStringsValue() + { + return $this->hasOneof(6); + } + + /** + * Generated from protobuf field .vectorindex._Metadata._ListOfStrings list_of_strings_value = 6; + * @param \Vectorindex\_Metadata\_ListOfStrings $var + * @return $this + */ + public function setListOfStringsValue($var) + { + GPBUtil::checkMessage($var, \Vectorindex\_Metadata\_ListOfStrings::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * @return string + */ + public function getValue() + { + return $this->whichOneof("value"); + } + +} + diff --git a/types/Vectorindex/_Metadata/_ListOfStrings.php b/types/Vectorindex/_Metadata/_ListOfStrings.php new file mode 100644 index 00000000..8e6df04d --- /dev/null +++ b/types/Vectorindex/_Metadata/_ListOfStrings.php @@ -0,0 +1,61 @@ +vectorindex._Metadata._ListOfStrings + */ +class _ListOfStrings extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated string values = 1; + */ + private $values; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string[]|\Google\Protobuf\Internal\RepeatedField $values + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Vectorindex::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated string values = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getValues() + { + return $this->values; + } + + /** + * Generated from protobuf field repeated string values = 1; + * @param string[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->values = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(_ListOfStrings::class, \Vectorindex\_Metadata__ListOfStrings::class); + diff --git a/types/Vectorindex/_MetadataRequest.php b/types/Vectorindex/_MetadataRequest.php new file mode 100644 index 00000000..286de40b --- /dev/null +++ b/types/Vectorindex/_MetadataRequest.php @@ -0,0 +1,96 @@ +vectorindex._MetadataRequest + */ +class _MetadataRequest extends \Google\Protobuf\Internal\Message +{ + protected $kind; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Vectorindex\_MetadataRequest\Some $some + * @type \Vectorindex\_MetadataRequest\All $all + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Vectorindex::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .vectorindex._MetadataRequest.Some some = 2; + * @return \Vectorindex\_MetadataRequest\Some|null + */ + public function getSome() + { + return $this->readOneof(2); + } + + public function hasSome() + { + return $this->hasOneof(2); + } + + /** + * Generated from protobuf field .vectorindex._MetadataRequest.Some some = 2; + * @param \Vectorindex\_MetadataRequest\Some $var + * @return $this + */ + public function setSome($var) + { + GPBUtil::checkMessage($var, \Vectorindex\_MetadataRequest\Some::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Generated from protobuf field .vectorindex._MetadataRequest.All all = 3; + * @return \Vectorindex\_MetadataRequest\All|null + */ + public function getAll() + { + return $this->readOneof(3); + } + + public function hasAll() + { + return $this->hasOneof(3); + } + + /** + * Generated from protobuf field .vectorindex._MetadataRequest.All all = 3; + * @param \Vectorindex\_MetadataRequest\All $var + * @return $this + */ + public function setAll($var) + { + GPBUtil::checkMessage($var, \Vectorindex\_MetadataRequest\All::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getKind() + { + return $this->whichOneof("kind"); + } + +} + diff --git a/types/Vectorindex/_MetadataRequest/All.php b/types/Vectorindex/_MetadataRequest/All.php new file mode 100644 index 00000000..e552d1a4 --- /dev/null +++ b/types/Vectorindex/_MetadataRequest/All.php @@ -0,0 +1,34 @@ +vectorindex._MetadataRequest.All + */ +class All extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Vectorindex::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(All::class, \Vectorindex\_MetadataRequest_All::class); + diff --git a/types/Vectorindex/_MetadataRequest/Some.php b/types/Vectorindex/_MetadataRequest/Some.php new file mode 100644 index 00000000..950df273 --- /dev/null +++ b/types/Vectorindex/_MetadataRequest/Some.php @@ -0,0 +1,61 @@ +vectorindex._MetadataRequest.Some + */ +class Some extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated string fields = 1; + */ + private $fields; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string[]|\Google\Protobuf\Internal\RepeatedField $fields + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Vectorindex::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated string fields = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFields() + { + return $this->fields; + } + + /** + * Generated from protobuf field repeated string fields = 1; + * @param string[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFields($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->fields = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Some::class, \Vectorindex\_MetadataRequest_Some::class); + diff --git a/types/Vectorindex/_MetadataRequest_All.php b/types/Vectorindex/_MetadataRequest_All.php new file mode 100644 index 00000000..ccceed57 --- /dev/null +++ b/types/Vectorindex/_MetadataRequest_All.php @@ -0,0 +1,16 @@ +vectorindex._NoScoreThreshold + */ +class _NoScoreThreshold extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Vectorindex::initOnce(); + parent::__construct($data); + } + +} + diff --git a/types/Vectorindex/_NotExpression.php b/types/Vectorindex/_NotExpression.php new file mode 100644 index 00000000..19545341 --- /dev/null +++ b/types/Vectorindex/_NotExpression.php @@ -0,0 +1,68 @@ +vectorindex._NotExpression + */ +class _NotExpression extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .vectorindex._FilterExpression expression_to_negate = 1; + */ + protected $expression_to_negate = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Vectorindex\_FilterExpression $expression_to_negate + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Vectorindex::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .vectorindex._FilterExpression expression_to_negate = 1; + * @return \Vectorindex\_FilterExpression|null + */ + public function getExpressionToNegate() + { + return $this->expression_to_negate; + } + + public function hasExpressionToNegate() + { + return isset($this->expression_to_negate); + } + + public function clearExpressionToNegate() + { + unset($this->expression_to_negate); + } + + /** + * Generated from protobuf field .vectorindex._FilterExpression expression_to_negate = 1; + * @param \Vectorindex\_FilterExpression $var + * @return $this + */ + public function setExpressionToNegate($var) + { + GPBUtil::checkMessage($var, \Vectorindex\_FilterExpression::class); + $this->expression_to_negate = $var; + + return $this; + } + +} + diff --git a/types/Vectorindex/_OrExpression.php b/types/Vectorindex/_OrExpression.php new file mode 100644 index 00000000..41834025 --- /dev/null +++ b/types/Vectorindex/_OrExpression.php @@ -0,0 +1,105 @@ +vectorindex._OrExpression + */ +class _OrExpression extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .vectorindex._FilterExpression first_expression = 1; + */ + protected $first_expression = null; + /** + * Generated from protobuf field .vectorindex._FilterExpression second_expression = 2; + */ + protected $second_expression = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Vectorindex\_FilterExpression $first_expression + * @type \Vectorindex\_FilterExpression $second_expression + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Vectorindex::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .vectorindex._FilterExpression first_expression = 1; + * @return \Vectorindex\_FilterExpression|null + */ + public function getFirstExpression() + { + return $this->first_expression; + } + + public function hasFirstExpression() + { + return isset($this->first_expression); + } + + public function clearFirstExpression() + { + unset($this->first_expression); + } + + /** + * Generated from protobuf field .vectorindex._FilterExpression first_expression = 1; + * @param \Vectorindex\_FilterExpression $var + * @return $this + */ + public function setFirstExpression($var) + { + GPBUtil::checkMessage($var, \Vectorindex\_FilterExpression::class); + $this->first_expression = $var; + + return $this; + } + + /** + * Generated from protobuf field .vectorindex._FilterExpression second_expression = 2; + * @return \Vectorindex\_FilterExpression|null + */ + public function getSecondExpression() + { + return $this->second_expression; + } + + public function hasSecondExpression() + { + return isset($this->second_expression); + } + + public function clearSecondExpression() + { + unset($this->second_expression); + } + + /** + * Generated from protobuf field .vectorindex._FilterExpression second_expression = 2; + * @param \Vectorindex\_FilterExpression $var + * @return $this + */ + public function setSecondExpression($var) + { + GPBUtil::checkMessage($var, \Vectorindex\_FilterExpression::class); + $this->second_expression = $var; + + return $this; + } + +} + diff --git a/types/Vectorindex/_SearchAndFetchVectorsHit.php b/types/Vectorindex/_SearchAndFetchVectorsHit.php new file mode 100644 index 00000000..653c3ef9 --- /dev/null +++ b/types/Vectorindex/_SearchAndFetchVectorsHit.php @@ -0,0 +1,149 @@ +vectorindex._SearchAndFetchVectorsHit + */ +class _SearchAndFetchVectorsHit extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + /** + * Generated from protobuf field float score = 2; + */ + protected $score = 0.0; + /** + * Generated from protobuf field repeated .vectorindex._Metadata metadata = 3; + */ + private $metadata; + /** + * Generated from protobuf field .vectorindex._Vector vector = 4; + */ + protected $vector = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * @type float $score + * @type \Vectorindex\_Metadata[]|\Google\Protobuf\Internal\RepeatedField $metadata + * @type \Vectorindex\_Vector $vector + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Vectorindex::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Generated from protobuf field string id = 1; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * Generated from protobuf field float score = 2; + * @return float + */ + public function getScore() + { + return $this->score; + } + + /** + * Generated from protobuf field float score = 2; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->score = $var; + + return $this; + } + + /** + * Generated from protobuf field repeated .vectorindex._Metadata metadata = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMetadata() + { + return $this->metadata; + } + + /** + * Generated from protobuf field repeated .vectorindex._Metadata metadata = 3; + * @param \Vectorindex\_Metadata[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMetadata($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Vectorindex\_Metadata::class); + $this->metadata = $arr; + + return $this; + } + + /** + * Generated from protobuf field .vectorindex._Vector vector = 4; + * @return \Vectorindex\_Vector|null + */ + public function getVector() + { + return $this->vector; + } + + public function hasVector() + { + return isset($this->vector); + } + + public function clearVector() + { + unset($this->vector); + } + + /** + * Generated from protobuf field .vectorindex._Vector vector = 4; + * @param \Vectorindex\_Vector $var + * @return $this + */ + public function setVector($var) + { + GPBUtil::checkMessage($var, \Vectorindex\_Vector::class); + $this->vector = $var; + + return $this; + } + +} + diff --git a/types/Vectorindex/_SearchAndFetchVectorsRequest.php b/types/Vectorindex/_SearchAndFetchVectorsRequest.php new file mode 100644 index 00000000..fee0332c --- /dev/null +++ b/types/Vectorindex/_SearchAndFetchVectorsRequest.php @@ -0,0 +1,261 @@ +vectorindex._SearchAndFetchVectorsRequest + */ +class _SearchAndFetchVectorsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string index_name = 1; + */ + protected $index_name = ''; + /** + * Generated from protobuf field uint32 top_k = 2; + */ + protected $top_k = 0; + /** + * Generated from protobuf field .vectorindex._Vector query_vector = 3; + */ + protected $query_vector = null; + /** + * Generated from protobuf field .vectorindex._MetadataRequest metadata_fields = 4; + */ + protected $metadata_fields = null; + /** + * Generated from protobuf field .vectorindex._FilterExpression filter = 7; + */ + protected $filter = null; + protected $threshold; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $index_name + * @type int $top_k + * @type \Vectorindex\_Vector $query_vector + * @type \Vectorindex\_MetadataRequest $metadata_fields + * @type float $score_threshold + * @type \Vectorindex\_NoScoreThreshold $no_score_threshold + * @type \Vectorindex\_FilterExpression $filter + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Vectorindex::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string index_name = 1; + * @return string + */ + public function getIndexName() + { + return $this->index_name; + } + + /** + * Generated from protobuf field string index_name = 1; + * @param string $var + * @return $this + */ + public function setIndexName($var) + { + GPBUtil::checkString($var, True); + $this->index_name = $var; + + return $this; + } + + /** + * Generated from protobuf field uint32 top_k = 2; + * @return int + */ + public function getTopK() + { + return $this->top_k; + } + + /** + * Generated from protobuf field uint32 top_k = 2; + * @param int $var + * @return $this + */ + public function setTopK($var) + { + GPBUtil::checkUint32($var); + $this->top_k = $var; + + return $this; + } + + /** + * Generated from protobuf field .vectorindex._Vector query_vector = 3; + * @return \Vectorindex\_Vector|null + */ + public function getQueryVector() + { + return $this->query_vector; + } + + public function hasQueryVector() + { + return isset($this->query_vector); + } + + public function clearQueryVector() + { + unset($this->query_vector); + } + + /** + * Generated from protobuf field .vectorindex._Vector query_vector = 3; + * @param \Vectorindex\_Vector $var + * @return $this + */ + public function setQueryVector($var) + { + GPBUtil::checkMessage($var, \Vectorindex\_Vector::class); + $this->query_vector = $var; + + return $this; + } + + /** + * Generated from protobuf field .vectorindex._MetadataRequest metadata_fields = 4; + * @return \Vectorindex\_MetadataRequest|null + */ + public function getMetadataFields() + { + return $this->metadata_fields; + } + + public function hasMetadataFields() + { + return isset($this->metadata_fields); + } + + public function clearMetadataFields() + { + unset($this->metadata_fields); + } + + /** + * Generated from protobuf field .vectorindex._MetadataRequest metadata_fields = 4; + * @param \Vectorindex\_MetadataRequest $var + * @return $this + */ + public function setMetadataFields($var) + { + GPBUtil::checkMessage($var, \Vectorindex\_MetadataRequest::class); + $this->metadata_fields = $var; + + return $this; + } + + /** + * Generated from protobuf field float score_threshold = 5; + * @return float + */ + public function getScoreThreshold() + { + return $this->readOneof(5); + } + + public function hasScoreThreshold() + { + return $this->hasOneof(5); + } + + /** + * Generated from protobuf field float score_threshold = 5; + * @param float $var + * @return $this + */ + public function setScoreThreshold($var) + { + GPBUtil::checkFloat($var); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Generated from protobuf field .vectorindex._NoScoreThreshold no_score_threshold = 6; + * @return \Vectorindex\_NoScoreThreshold|null + */ + public function getNoScoreThreshold() + { + return $this->readOneof(6); + } + + public function hasNoScoreThreshold() + { + return $this->hasOneof(6); + } + + /** + * Generated from protobuf field .vectorindex._NoScoreThreshold no_score_threshold = 6; + * @param \Vectorindex\_NoScoreThreshold $var + * @return $this + */ + public function setNoScoreThreshold($var) + { + GPBUtil::checkMessage($var, \Vectorindex\_NoScoreThreshold::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Generated from protobuf field .vectorindex._FilterExpression filter = 7; + * @return \Vectorindex\_FilterExpression|null + */ + public function getFilter() + { + return $this->filter; + } + + public function hasFilter() + { + return isset($this->filter); + } + + public function clearFilter() + { + unset($this->filter); + } + + /** + * Generated from protobuf field .vectorindex._FilterExpression filter = 7; + * @param \Vectorindex\_FilterExpression $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkMessage($var, \Vectorindex\_FilterExpression::class); + $this->filter = $var; + + return $this; + } + + /** + * @return string + */ + public function getThreshold() + { + return $this->whichOneof("threshold"); + } + +} + diff --git a/types/Vectorindex/_SearchAndFetchVectorsResponse.php b/types/Vectorindex/_SearchAndFetchVectorsResponse.php new file mode 100644 index 00000000..95ece5e1 --- /dev/null +++ b/types/Vectorindex/_SearchAndFetchVectorsResponse.php @@ -0,0 +1,58 @@ +vectorindex._SearchAndFetchVectorsResponse + */ +class _SearchAndFetchVectorsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .vectorindex._SearchAndFetchVectorsHit hits = 1; + */ + private $hits; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Vectorindex\_SearchAndFetchVectorsHit[]|\Google\Protobuf\Internal\RepeatedField $hits + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Vectorindex::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .vectorindex._SearchAndFetchVectorsHit hits = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getHits() + { + return $this->hits; + } + + /** + * Generated from protobuf field repeated .vectorindex._SearchAndFetchVectorsHit hits = 1; + * @param \Vectorindex\_SearchAndFetchVectorsHit[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setHits($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Vectorindex\_SearchAndFetchVectorsHit::class); + $this->hits = $arr; + + return $this; + } + +} + diff --git a/types/Vectorindex/_SearchHit.php b/types/Vectorindex/_SearchHit.php new file mode 100644 index 00000000..ee75c84f --- /dev/null +++ b/types/Vectorindex/_SearchHit.php @@ -0,0 +1,112 @@ +vectorindex._SearchHit + */ +class _SearchHit extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + /** + * Generated from protobuf field float score = 2; + */ + protected $score = 0.0; + /** + * Generated from protobuf field repeated .vectorindex._Metadata metadata = 3; + */ + private $metadata; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * @type float $score + * @type \Vectorindex\_Metadata[]|\Google\Protobuf\Internal\RepeatedField $metadata + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Vectorindex::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Generated from protobuf field string id = 1; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * Generated from protobuf field float score = 2; + * @return float + */ + public function getScore() + { + return $this->score; + } + + /** + * Generated from protobuf field float score = 2; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->score = $var; + + return $this; + } + + /** + * Generated from protobuf field repeated .vectorindex._Metadata metadata = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMetadata() + { + return $this->metadata; + } + + /** + * Generated from protobuf field repeated .vectorindex._Metadata metadata = 3; + * @param \Vectorindex\_Metadata[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMetadata($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Vectorindex\_Metadata::class); + $this->metadata = $arr; + + return $this; + } + +} + diff --git a/types/Vectorindex/_SearchRequest.php b/types/Vectorindex/_SearchRequest.php new file mode 100644 index 00000000..6363c193 --- /dev/null +++ b/types/Vectorindex/_SearchRequest.php @@ -0,0 +1,261 @@ +vectorindex._SearchRequest + */ +class _SearchRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string index_name = 1; + */ + protected $index_name = ''; + /** + * Generated from protobuf field uint32 top_k = 2; + */ + protected $top_k = 0; + /** + * Generated from protobuf field .vectorindex._Vector query_vector = 3; + */ + protected $query_vector = null; + /** + * Generated from protobuf field .vectorindex._MetadataRequest metadata_fields = 4; + */ + protected $metadata_fields = null; + /** + * Generated from protobuf field .vectorindex._FilterExpression filter = 7; + */ + protected $filter = null; + protected $threshold; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $index_name + * @type int $top_k + * @type \Vectorindex\_Vector $query_vector + * @type \Vectorindex\_MetadataRequest $metadata_fields + * @type float $score_threshold + * @type \Vectorindex\_NoScoreThreshold $no_score_threshold + * @type \Vectorindex\_FilterExpression $filter + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Vectorindex::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string index_name = 1; + * @return string + */ + public function getIndexName() + { + return $this->index_name; + } + + /** + * Generated from protobuf field string index_name = 1; + * @param string $var + * @return $this + */ + public function setIndexName($var) + { + GPBUtil::checkString($var, True); + $this->index_name = $var; + + return $this; + } + + /** + * Generated from protobuf field uint32 top_k = 2; + * @return int + */ + public function getTopK() + { + return $this->top_k; + } + + /** + * Generated from protobuf field uint32 top_k = 2; + * @param int $var + * @return $this + */ + public function setTopK($var) + { + GPBUtil::checkUint32($var); + $this->top_k = $var; + + return $this; + } + + /** + * Generated from protobuf field .vectorindex._Vector query_vector = 3; + * @return \Vectorindex\_Vector|null + */ + public function getQueryVector() + { + return $this->query_vector; + } + + public function hasQueryVector() + { + return isset($this->query_vector); + } + + public function clearQueryVector() + { + unset($this->query_vector); + } + + /** + * Generated from protobuf field .vectorindex._Vector query_vector = 3; + * @param \Vectorindex\_Vector $var + * @return $this + */ + public function setQueryVector($var) + { + GPBUtil::checkMessage($var, \Vectorindex\_Vector::class); + $this->query_vector = $var; + + return $this; + } + + /** + * Generated from protobuf field .vectorindex._MetadataRequest metadata_fields = 4; + * @return \Vectorindex\_MetadataRequest|null + */ + public function getMetadataFields() + { + return $this->metadata_fields; + } + + public function hasMetadataFields() + { + return isset($this->metadata_fields); + } + + public function clearMetadataFields() + { + unset($this->metadata_fields); + } + + /** + * Generated from protobuf field .vectorindex._MetadataRequest metadata_fields = 4; + * @param \Vectorindex\_MetadataRequest $var + * @return $this + */ + public function setMetadataFields($var) + { + GPBUtil::checkMessage($var, \Vectorindex\_MetadataRequest::class); + $this->metadata_fields = $var; + + return $this; + } + + /** + * Generated from protobuf field float score_threshold = 5; + * @return float + */ + public function getScoreThreshold() + { + return $this->readOneof(5); + } + + public function hasScoreThreshold() + { + return $this->hasOneof(5); + } + + /** + * Generated from protobuf field float score_threshold = 5; + * @param float $var + * @return $this + */ + public function setScoreThreshold($var) + { + GPBUtil::checkFloat($var); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Generated from protobuf field .vectorindex._NoScoreThreshold no_score_threshold = 6; + * @return \Vectorindex\_NoScoreThreshold|null + */ + public function getNoScoreThreshold() + { + return $this->readOneof(6); + } + + public function hasNoScoreThreshold() + { + return $this->hasOneof(6); + } + + /** + * Generated from protobuf field .vectorindex._NoScoreThreshold no_score_threshold = 6; + * @param \Vectorindex\_NoScoreThreshold $var + * @return $this + */ + public function setNoScoreThreshold($var) + { + GPBUtil::checkMessage($var, \Vectorindex\_NoScoreThreshold::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Generated from protobuf field .vectorindex._FilterExpression filter = 7; + * @return \Vectorindex\_FilterExpression|null + */ + public function getFilter() + { + return $this->filter; + } + + public function hasFilter() + { + return isset($this->filter); + } + + public function clearFilter() + { + unset($this->filter); + } + + /** + * Generated from protobuf field .vectorindex._FilterExpression filter = 7; + * @param \Vectorindex\_FilterExpression $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkMessage($var, \Vectorindex\_FilterExpression::class); + $this->filter = $var; + + return $this; + } + + /** + * @return string + */ + public function getThreshold() + { + return $this->whichOneof("threshold"); + } + +} + diff --git a/types/Vectorindex/_SearchResponse.php b/types/Vectorindex/_SearchResponse.php new file mode 100644 index 00000000..804b04cf --- /dev/null +++ b/types/Vectorindex/_SearchResponse.php @@ -0,0 +1,58 @@ +vectorindex._SearchResponse + */ +class _SearchResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .vectorindex._SearchHit hits = 1; + */ + private $hits; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Vectorindex\_SearchHit[]|\Google\Protobuf\Internal\RepeatedField $hits + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Vectorindex::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .vectorindex._SearchHit hits = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getHits() + { + return $this->hits; + } + + /** + * Generated from protobuf field repeated .vectorindex._SearchHit hits = 1; + * @param \Vectorindex\_SearchHit[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setHits($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Vectorindex\_SearchHit::class); + $this->hits = $arr; + + return $this; + } + +} + diff --git a/types/Vectorindex/_UpsertItemBatchRequest.php b/types/Vectorindex/_UpsertItemBatchRequest.php new file mode 100644 index 00000000..42af1848 --- /dev/null +++ b/types/Vectorindex/_UpsertItemBatchRequest.php @@ -0,0 +1,85 @@ +vectorindex._UpsertItemBatchRequest + */ +class _UpsertItemBatchRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string index_name = 1; + */ + protected $index_name = ''; + /** + * Generated from protobuf field repeated .vectorindex._Item items = 2; + */ + private $items; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $index_name + * @type \Vectorindex\_Item[]|\Google\Protobuf\Internal\RepeatedField $items + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Vectorindex::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string index_name = 1; + * @return string + */ + public function getIndexName() + { + return $this->index_name; + } + + /** + * Generated from protobuf field string index_name = 1; + * @param string $var + * @return $this + */ + public function setIndexName($var) + { + GPBUtil::checkString($var, True); + $this->index_name = $var; + + return $this; + } + + /** + * Generated from protobuf field repeated .vectorindex._Item items = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * Generated from protobuf field repeated .vectorindex._Item items = 2; + * @param \Vectorindex\_Item[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Vectorindex\_Item::class); + $this->items = $arr; + + return $this; + } + +} + diff --git a/types/Vectorindex/_UpsertItemBatchResponse.php b/types/Vectorindex/_UpsertItemBatchResponse.php new file mode 100644 index 00000000..14e19456 --- /dev/null +++ b/types/Vectorindex/_UpsertItemBatchResponse.php @@ -0,0 +1,58 @@ +vectorindex._UpsertItemBatchResponse + */ +class _UpsertItemBatchResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated uint32 error_indices = 1; + */ + private $error_indices; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int[]|\Google\Protobuf\Internal\RepeatedField $error_indices + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Vectorindex::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated uint32 error_indices = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getErrorIndices() + { + return $this->error_indices; + } + + /** + * Generated from protobuf field repeated uint32 error_indices = 1; + * @param int[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setErrorIndices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::UINT32); + $this->error_indices = $arr; + + return $this; + } + +} + diff --git a/types/Vectorindex/_Vector.php b/types/Vectorindex/_Vector.php new file mode 100644 index 00000000..b4bfbcab --- /dev/null +++ b/types/Vectorindex/_Vector.php @@ -0,0 +1,58 @@ +vectorindex._Vector + */ +class _Vector extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated float elements = 1; + */ + private $elements; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float[]|\Google\Protobuf\Internal\RepeatedField $elements + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Vectorindex::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated float elements = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getElements() + { + return $this->elements; + } + + /** + * Generated from protobuf field repeated float elements = 1; + * @param float[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setElements($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::FLOAT); + $this->elements = $arr; + + return $this; + } + +} + diff --git a/types/Webhook/WebhookClient.php b/types/Webhook/WebhookClient.php new file mode 100644 index 00000000..72427010 --- /dev/null +++ b/types/Webhook/WebhookClient.php @@ -0,0 +1,94 @@ +_simpleRequest('/webhook.Webhook/PutWebhook', + $argument, + ['\Webhook\_PutWebhookResponse', 'decode'], + $metadata, $options); + } + + /** + * @param \Webhook\_DeleteWebhookRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteWebhook(\Webhook\_DeleteWebhookRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/webhook.Webhook/DeleteWebhook', + $argument, + ['\Webhook\_DeleteWebhookResponse', 'decode'], + $metadata, $options); + } + + /** + * @param \Webhook\_ListWebhookRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListWebhooks(\Webhook\_ListWebhookRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/webhook.Webhook/ListWebhooks', + $argument, + ['\Webhook\_ListWebhooksResponse', 'decode'], + $metadata, $options); + } + + /** + * @param \Webhook\_GetWebhookSecretRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetWebhookSecret(\Webhook\_GetWebhookSecretRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/webhook.Webhook/GetWebhookSecret', + $argument, + ['\Webhook\_GetWebhookSecretResponse', 'decode'], + $metadata, $options); + } + + /** + * @param \Webhook\_RotateWebhookSecretRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function RotateWebhookSecret(\Webhook\_RotateWebhookSecretRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/webhook.Webhook/RotateWebhookSecret', + $argument, + ['\Webhook\_RotateWebhookSecretResponse', 'decode'], + $metadata, $options); + } + +} diff --git a/types/Webhook/_DeleteWebhookRequest.php b/types/Webhook/_DeleteWebhookRequest.php new file mode 100644 index 00000000..448cd590 --- /dev/null +++ b/types/Webhook/_DeleteWebhookRequest.php @@ -0,0 +1,68 @@ +webhook._DeleteWebhookRequest + */ +class _DeleteWebhookRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .webhook._WebhookId webhook_id = 1; + */ + protected $webhook_id = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Webhook\_WebhookId $webhook_id + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Webhook::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .webhook._WebhookId webhook_id = 1; + * @return \Webhook\_WebhookId|null + */ + public function getWebhookId() + { + return $this->webhook_id; + } + + public function hasWebhookId() + { + return isset($this->webhook_id); + } + + public function clearWebhookId() + { + unset($this->webhook_id); + } + + /** + * Generated from protobuf field .webhook._WebhookId webhook_id = 1; + * @param \Webhook\_WebhookId $var + * @return $this + */ + public function setWebhookId($var) + { + GPBUtil::checkMessage($var, \Webhook\_WebhookId::class); + $this->webhook_id = $var; + + return $this; + } + +} + diff --git a/types/Webhook/_DeleteWebhookResponse.php b/types/Webhook/_DeleteWebhookResponse.php new file mode 100644 index 00000000..a4844c99 --- /dev/null +++ b/types/Webhook/_DeleteWebhookResponse.php @@ -0,0 +1,31 @@ +webhook._DeleteWebhookResponse + */ +class _DeleteWebhookResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Webhook::initOnce(); + parent::__construct($data); + } + +} + diff --git a/types/Webhook/_GetWebhookSecretRequest.php b/types/Webhook/_GetWebhookSecretRequest.php new file mode 100644 index 00000000..ae0449e7 --- /dev/null +++ b/types/Webhook/_GetWebhookSecretRequest.php @@ -0,0 +1,85 @@ +webhook._GetWebhookSecretRequest + */ +class _GetWebhookSecretRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string cache_name = 1; + */ + protected $cache_name = ''; + /** + * Generated from protobuf field string webhook_name = 2; + */ + protected $webhook_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $cache_name + * @type string $webhook_name + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Webhook::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string cache_name = 1; + * @return string + */ + public function getCacheName() + { + return $this->cache_name; + } + + /** + * Generated from protobuf field string cache_name = 1; + * @param string $var + * @return $this + */ + public function setCacheName($var) + { + GPBUtil::checkString($var, True); + $this->cache_name = $var; + + return $this; + } + + /** + * Generated from protobuf field string webhook_name = 2; + * @return string + */ + public function getWebhookName() + { + return $this->webhook_name; + } + + /** + * Generated from protobuf field string webhook_name = 2; + * @param string $var + * @return $this + */ + public function setWebhookName($var) + { + GPBUtil::checkString($var, True); + $this->webhook_name = $var; + + return $this; + } + +} + diff --git a/types/Webhook/_GetWebhookSecretResponse.php b/types/Webhook/_GetWebhookSecretResponse.php new file mode 100644 index 00000000..bee5c88d --- /dev/null +++ b/types/Webhook/_GetWebhookSecretResponse.php @@ -0,0 +1,112 @@ +webhook._GetWebhookSecretResponse + */ +class _GetWebhookSecretResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string cache_name = 1; + */ + protected $cache_name = ''; + /** + * Generated from protobuf field string webhook_name = 2; + */ + protected $webhook_name = ''; + /** + * Generated from protobuf field string secret_string = 3; + */ + protected $secret_string = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $cache_name + * @type string $webhook_name + * @type string $secret_string + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Webhook::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string cache_name = 1; + * @return string + */ + public function getCacheName() + { + return $this->cache_name; + } + + /** + * Generated from protobuf field string cache_name = 1; + * @param string $var + * @return $this + */ + public function setCacheName($var) + { + GPBUtil::checkString($var, True); + $this->cache_name = $var; + + return $this; + } + + /** + * Generated from protobuf field string webhook_name = 2; + * @return string + */ + public function getWebhookName() + { + return $this->webhook_name; + } + + /** + * Generated from protobuf field string webhook_name = 2; + * @param string $var + * @return $this + */ + public function setWebhookName($var) + { + GPBUtil::checkString($var, True); + $this->webhook_name = $var; + + return $this; + } + + /** + * Generated from protobuf field string secret_string = 3; + * @return string + */ + public function getSecretString() + { + return $this->secret_string; + } + + /** + * Generated from protobuf field string secret_string = 3; + * @param string $var + * @return $this + */ + public function setSecretString($var) + { + GPBUtil::checkString($var, True); + $this->secret_string = $var; + + return $this; + } + +} + diff --git a/types/Webhook/_ListWebhookRequest.php b/types/Webhook/_ListWebhookRequest.php new file mode 100644 index 00000000..871e5590 --- /dev/null +++ b/types/Webhook/_ListWebhookRequest.php @@ -0,0 +1,58 @@ +webhook._ListWebhookRequest + */ +class _ListWebhookRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string cache_name = 1; + */ + protected $cache_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $cache_name + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Webhook::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string cache_name = 1; + * @return string + */ + public function getCacheName() + { + return $this->cache_name; + } + + /** + * Generated from protobuf field string cache_name = 1; + * @param string $var + * @return $this + */ + public function setCacheName($var) + { + GPBUtil::checkString($var, True); + $this->cache_name = $var; + + return $this; + } + +} + diff --git a/types/Webhook/_ListWebhooksResponse.php b/types/Webhook/_ListWebhooksResponse.php new file mode 100644 index 00000000..2dd6ff95 --- /dev/null +++ b/types/Webhook/_ListWebhooksResponse.php @@ -0,0 +1,58 @@ +webhook._ListWebhooksResponse + */ +class _ListWebhooksResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .webhook._Webhook webhook = 1; + */ + private $webhook; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Webhook\_Webhook[]|\Google\Protobuf\Internal\RepeatedField $webhook + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Webhook::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .webhook._Webhook webhook = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWebhook() + { + return $this->webhook; + } + + /** + * Generated from protobuf field repeated .webhook._Webhook webhook = 1; + * @param \Webhook\_Webhook[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWebhook($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Webhook\_Webhook::class); + $this->webhook = $arr; + + return $this; + } + +} + diff --git a/types/Webhook/_PutWebhookRequest.php b/types/Webhook/_PutWebhookRequest.php new file mode 100644 index 00000000..608aae41 --- /dev/null +++ b/types/Webhook/_PutWebhookRequest.php @@ -0,0 +1,68 @@ +webhook._PutWebhookRequest + */ +class _PutWebhookRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .webhook._Webhook webhook = 1; + */ + protected $webhook = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Webhook\_Webhook $webhook + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Webhook::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .webhook._Webhook webhook = 1; + * @return \Webhook\_Webhook|null + */ + public function getWebhook() + { + return $this->webhook; + } + + public function hasWebhook() + { + return isset($this->webhook); + } + + public function clearWebhook() + { + unset($this->webhook); + } + + /** + * Generated from protobuf field .webhook._Webhook webhook = 1; + * @param \Webhook\_Webhook $var + * @return $this + */ + public function setWebhook($var) + { + GPBUtil::checkMessage($var, \Webhook\_Webhook::class); + $this->webhook = $var; + + return $this; + } + +} + diff --git a/types/Webhook/_PutWebhookResponse.php b/types/Webhook/_PutWebhookResponse.php new file mode 100644 index 00000000..e2600f2d --- /dev/null +++ b/types/Webhook/_PutWebhookResponse.php @@ -0,0 +1,58 @@ +webhook._PutWebhookResponse + */ +class _PutWebhookResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string secret_string = 1; + */ + protected $secret_string = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $secret_string + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Webhook::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string secret_string = 1; + * @return string + */ + public function getSecretString() + { + return $this->secret_string; + } + + /** + * Generated from protobuf field string secret_string = 1; + * @param string $var + * @return $this + */ + public function setSecretString($var) + { + GPBUtil::checkString($var, True); + $this->secret_string = $var; + + return $this; + } + +} + diff --git a/types/Webhook/_RotateWebhookSecretRequest.php b/types/Webhook/_RotateWebhookSecretRequest.php new file mode 100644 index 00000000..9d25c488 --- /dev/null +++ b/types/Webhook/_RotateWebhookSecretRequest.php @@ -0,0 +1,68 @@ +webhook._RotateWebhookSecretRequest + */ +class _RotateWebhookSecretRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .webhook._WebhookId webhook_id = 1; + */ + protected $webhook_id = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Webhook\_WebhookId $webhook_id + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Webhook::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .webhook._WebhookId webhook_id = 1; + * @return \Webhook\_WebhookId|null + */ + public function getWebhookId() + { + return $this->webhook_id; + } + + public function hasWebhookId() + { + return isset($this->webhook_id); + } + + public function clearWebhookId() + { + unset($this->webhook_id); + } + + /** + * Generated from protobuf field .webhook._WebhookId webhook_id = 1; + * @param \Webhook\_WebhookId $var + * @return $this + */ + public function setWebhookId($var) + { + GPBUtil::checkMessage($var, \Webhook\_WebhookId::class); + $this->webhook_id = $var; + + return $this; + } + +} + diff --git a/types/Webhook/_RotateWebhookSecretResponse.php b/types/Webhook/_RotateWebhookSecretResponse.php new file mode 100644 index 00000000..536df710 --- /dev/null +++ b/types/Webhook/_RotateWebhookSecretResponse.php @@ -0,0 +1,58 @@ +webhook._RotateWebhookSecretResponse + */ +class _RotateWebhookSecretResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string secret_string = 1; + */ + protected $secret_string = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $secret_string + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Webhook::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string secret_string = 1; + * @return string + */ + public function getSecretString() + { + return $this->secret_string; + } + + /** + * Generated from protobuf field string secret_string = 1; + * @param string $var + * @return $this + */ + public function setSecretString($var) + { + GPBUtil::checkString($var, True); + $this->secret_string = $var; + + return $this; + } + +} + diff --git a/types/Webhook/_Webhook.php b/types/Webhook/_Webhook.php new file mode 100644 index 00000000..32183ee1 --- /dev/null +++ b/types/Webhook/_Webhook.php @@ -0,0 +1,132 @@ +webhook._Webhook + */ +class _Webhook extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .webhook._WebhookId webhook_id = 1; + */ + protected $webhook_id = null; + /** + * Generated from protobuf field string topic_name = 2; + */ + protected $topic_name = ''; + /** + * Generated from protobuf field .webhook._WebhookDestination destination = 3; + */ + protected $destination = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Webhook\_WebhookId $webhook_id + * @type string $topic_name + * @type \Webhook\_WebhookDestination $destination + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Webhook::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .webhook._WebhookId webhook_id = 1; + * @return \Webhook\_WebhookId|null + */ + public function getWebhookId() + { + return $this->webhook_id; + } + + public function hasWebhookId() + { + return isset($this->webhook_id); + } + + public function clearWebhookId() + { + unset($this->webhook_id); + } + + /** + * Generated from protobuf field .webhook._WebhookId webhook_id = 1; + * @param \Webhook\_WebhookId $var + * @return $this + */ + public function setWebhookId($var) + { + GPBUtil::checkMessage($var, \Webhook\_WebhookId::class); + $this->webhook_id = $var; + + return $this; + } + + /** + * Generated from protobuf field string topic_name = 2; + * @return string + */ + public function getTopicName() + { + return $this->topic_name; + } + + /** + * Generated from protobuf field string topic_name = 2; + * @param string $var + * @return $this + */ + public function setTopicName($var) + { + GPBUtil::checkString($var, True); + $this->topic_name = $var; + + return $this; + } + + /** + * Generated from protobuf field .webhook._WebhookDestination destination = 3; + * @return \Webhook\_WebhookDestination|null + */ + public function getDestination() + { + return $this->destination; + } + + public function hasDestination() + { + return isset($this->destination); + } + + public function clearDestination() + { + unset($this->destination); + } + + /** + * Generated from protobuf field .webhook._WebhookDestination destination = 3; + * @param \Webhook\_WebhookDestination $var + * @return $this + */ + public function setDestination($var) + { + GPBUtil::checkMessage($var, \Webhook\_WebhookDestination::class); + $this->destination = $var; + + return $this; + } + +} + diff --git a/types/Webhook/_WebhookDestination.php b/types/Webhook/_WebhookDestination.php new file mode 100644 index 00000000..128f7ceb --- /dev/null +++ b/types/Webhook/_WebhookDestination.php @@ -0,0 +1,68 @@ +webhook._WebhookDestination + */ +class _WebhookDestination extends \Google\Protobuf\Internal\Message +{ + protected $kind; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $post_url + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Webhook::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string post_url = 1; + * @return string + */ + public function getPostUrl() + { + return $this->readOneof(1); + } + + public function hasPostUrl() + { + return $this->hasOneof(1); + } + + /** + * Generated from protobuf field string post_url = 1; + * @param string $var + * @return $this + */ + public function setPostUrl($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getKind() + { + return $this->whichOneof("kind"); + } + +} + diff --git a/types/Webhook/_WebhookId.php b/types/Webhook/_WebhookId.php new file mode 100644 index 00000000..35a076af --- /dev/null +++ b/types/Webhook/_WebhookId.php @@ -0,0 +1,92 @@ +webhook._WebhookId + */ +class _WebhookId extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string cache_name = 1; + */ + protected $cache_name = ''; + /** + * This is limited to 128 chars. + * + * Generated from protobuf field string webhook_name = 2; + */ + protected $webhook_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $cache_name + * @type string $webhook_name + * This is limited to 128 chars. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Webhook::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string cache_name = 1; + * @return string + */ + public function getCacheName() + { + return $this->cache_name; + } + + /** + * Generated from protobuf field string cache_name = 1; + * @param string $var + * @return $this + */ + public function setCacheName($var) + { + GPBUtil::checkString($var, True); + $this->cache_name = $var; + + return $this; + } + + /** + * This is limited to 128 chars. + * + * Generated from protobuf field string webhook_name = 2; + * @return string + */ + public function getWebhookName() + { + return $this->webhook_name; + } + + /** + * This is limited to 128 chars. + * + * Generated from protobuf field string webhook_name = 2; + * @param string $var + * @return $this + */ + public function setWebhookName($var) + { + GPBUtil::checkString($var, True); + $this->webhook_name = $var; + + return $this; + } + +} + From 44dbeeff83afc08994cd2daba71fcbf3216b3141 Mon Sep 17 00:00:00 2001 From: rishtigupta Date: Fri, 16 Feb 2024 18:14:30 +0000 Subject: [PATCH 2/2] Update templated README.md file --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ab71838f..1f68bfa7 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -logo +logo [![project status](https://momentohq.github.io/standards-and-practices/badges/project-status-official.svg)](https://github.com/momentohq/standards-and-practices/blob/main/docs/momento-on-github.md) [![project stability](https://momentohq.github.io/standards-and-practices/badges/project-stability-stable.svg)](https://github.com/momentohq/standards-and-practices/blob/main/docs/momento-on-github.md)